home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / backup / backup-1.03 / backup-1
Tape Archive  |  1994-06-13  |  230.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: backup-1

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), directory backup/, mode 40700 , uid 0 , gid 0 , size 0 , seconds 5577000121, user root, group root default
98% file data default
41% TrID Sybase iAnywhere database files default (weak)
36% TrID TAR - Tape ARchive (GNU) default
21% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU) default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 62 61 63 6b 75 70 2f 00 | 00 00 00 00 00 00 00 00 |backup/.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 34 30 37 | 30 30 20 00 20 20 20 20 |.... 407|00 . |
|00000070| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 35 37 37 30 30 30 | 0 | 5577000|
|00000090| 31 32 31 20 20 31 30 32 | 37 30 00 20 35 00 00 00 |121 102|70. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 62 61 63 6b 75 70 2f 61 | 66 69 6f 73 63 72 69 70 |backup/a|fioscrip|
|00000210| 74 73 2f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ts/.....|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 20 20 |.... 407|55 . |
|00000270| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000280| 20 20 20 20 20 20 30 20 | 20 35 35 37 36 37 37 36 | 0 | 5576776|
|00000290| 36 32 31 20 20 31 32 36 | 36 30 00 20 35 00 00 00 |621 126|60. 5...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 62 61 63 6b 75 70 2f 61 | 66 69 6f 73 63 72 69 70 |backup/a|fioscrip|
|00000410| 74 73 2f 6c 69 73 74 62 | 61 63 6b 75 70 00 00 00 |ts/listb|ackup...|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 31 30 30 37 | 35 35 20 00 20 20 20 20 |....1007|55 . |
|00000470| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000480| 20 20 20 33 31 37 37 20 | 20 35 35 33 31 34 37 30 | 3177 | 5531470|
|00000490| 34 33 32 20 20 31 35 30 | 33 32 00 20 30 00 00 00 |432 150|32. 0...|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00000610| 2f 69 63 6d 61 6b 65 20 | 2d 71 69 0a 0a 23 64 65 |/icmake |-qi..#de|
|00000620| 66 69 6e 65 20 56 45 52 | 20 20 20 20 20 20 20 20 |fine VER| |
|00000630| 20 20 20 20 20 22 31 2e | 30 30 22 0a 0a 73 74 72 | "1.|00"..str|
|00000640| 69 6e 67 20 0a 20 20 20 | 20 73 69 7a 65 66 6c 61 |ing . | sizefla|
|00000650| 67 3b 0a 20 20 20 20 0a | 76 6f 69 64 20 67 65 74 |g;. .|void get|
|00000660| 73 69 7a 65 66 6c 61 67 | 20 28 73 74 72 69 6e 67 |sizeflag| (string|
|00000670| 20 61 76 30 29 0a 7b 0a | 20 20 20 20 73 74 72 69 | av0).{.| stri|
|00000680| 6e 67 0a 20 20 20 20 20 | 20 20 20 69 6e 66 3b 0a |ng. | inf;.|
|00000690| 20 20 20 20 6c 69 73 74 | 0a 20 20 20 20 20 20 20 | list|. |
|000006a0| 20 69 6e 70 75 74 3b 0a | 09 0a 20 20 20 20 69 6e | input;.|.. in|
|000006b0| 66 20 3d 20 63 68 61 6e | 67 65 5f 62 61 73 65 20 |f = chan|ge_base |
|000006c0| 28 61 76 30 2c 20 22 73 | 69 7a 65 22 29 3b 0a 20 |(av0, "s|ize");. |
|000006d0| 20 20 20 69 6e 66 20 3d | 20 63 68 61 6e 67 65 5f | inf =| change_|
|000006e0| 65 78 74 20 20 28 69 6e | 66 2c 20 22 22 29 3b 0a |ext (in|f, "");.|
|000006f0| 20 20 20 20 0a 20 20 20 | 20 69 66 20 28 69 6e 70 | . | if (inp|
|00000700| 75 74 20 3d 20 66 67 65 | 74 73 20 28 69 6e 66 2c |ut = fge|ts (inf,|
|00000710| 20 30 29 29 0a 20 20 20 | 20 20 20 20 20 73 69 7a | 0)). | siz|
|00000720| 65 66 6c 61 67 20 3d 20 | 22 2d 73 20 22 20 2b 20 |eflag = |"-s " + |
|00000730| 65 6c 65 6d 65 6e 74 20 | 28 30 2c 20 73 74 72 74 |element |(0, strt|
|00000740| 6f 6b 20 28 65 6c 65 6d | 65 6e 74 20 28 30 2c 20 |ok (elem|ent (0, |
|00000750| 69 6e 70 75 74 29 2c 20 | 22 20 5c 74 5c 6e 22 29 |input), |" \t\n")|
|00000760| 29 3b 0a 7d 0a 0a 76 6f | 69 64 20 6d 61 69 6e 20 |);.}..vo|id main |
|00000770| 28 69 6e 74 20 61 72 67 | 63 2c 20 6c 69 73 74 20 |(int arg|c, list |
|00000780| 61 72 67 76 29 0a 7b 0a | 20 20 20 20 73 74 72 69 |argv).{.| stri|
|00000790| 6e 67 0a 09 62 61 63 6b | 75 70 66 69 6c 65 2c 0a |ng..back|upfile,.|
|000007a0| 20 20 20 20 09 70 61 74 | 74 65 72 6e 3b 0a 09 0a | .pat|tern;...|
|000007b0| 20 20 20 20 65 63 68 6f | 20 28 30 29 3b 0a 20 20 | echo| (0);. |
|000007c0| 20 20 0a 20 20 20 20 69 | 66 20 28 61 72 67 63 20 | . i|f (argc |
|000007d0| 3c 20 32 20 7c 7c 20 61 | 72 67 63 20 3e 20 33 29 |< 2 || a|rgc > 3)|
|000007e0| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 70 |. {. | p|
|000007f0| 72 69 6e 74 66 20 28 22 | 5c 6e 22 0a 09 20 20 20 |rintf ("|\n".. |
|00000800| 20 20 20 20 20 22 49 43 | 43 45 20 42 61 63 6b 75 | "IC|CE Backu|
|00000810| 70 20 43 6f 6e 74 65 6e | 74 73 20 4c 69 73 74 65 |p Conten|ts Liste|
|00000820| 72 20 20 56 22 20 56 45 | 52 20 22 5c 6e 22 0a 09 |r V" VE|R "\n"..|
|00000830| 09 22 43 6f 70 79 72 69 | 67 68 74 20 28 63 29 20 |."Copyri|ght (c) |
|00000840| 49 43 43 45 20 31 39 39 | 34 2e 20 41 6c 6c 20 72 |ICCE 199|4. All r|
|00000850| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 5c |ights re|served.\|
|00000860| 6e 22 0a 09 09 22 5c 6e | 22 0a 09 09 22 6c 69 73 |n"..."\n|"..."lis|
|00000870| 74 62 61 63 6b 75 70 20 | 62 79 20 4b 61 72 65 6c |tbackup |by Karel|
|00000880| 20 4b 75 62 61 74 2e 5c | 6e 22 0a 09 09 22 5c 6e | Kubat.\|n"..."\n|
|00000890| 22 0a 09 09 22 55 73 61 | 67 65 3a 20 6c 69 73 74 |"..."Usa|ge: list|
|000008a0| 62 61 63 6b 75 70 20 62 | 61 63 6b 75 70 66 69 6c |backup b|ackupfil|
|000008b0| 65 20 5b 70 61 74 74 65 | 72 6e 5d 5c 6e 22 0a 09 |e [patte|rn]\n"..|
|000008c0| 09 22 77 68 65 72 65 3a | 5c 6e 22 0a 20 20 20 20 |."where:|\n". |
|000008d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 20 20 20 | | " |
|000008e0| 20 20 20 20 62 61 63 6b | 75 70 66 69 6c 65 20 3a | back|upfile :|
|000008f0| 20 74 68 65 20 61 66 69 | 6f 27 64 20 62 61 63 6b | the afi|o'd back|
|00000900| 75 70 5c 6e 22 0a 20 20 | 20 20 20 20 20 20 20 20 |up\n". | |
|00000910| 20 20 20 20 20 20 22 20 | 20 20 20 20 20 20 70 61 | " | pa|
|00000920| 74 74 65 72 6e 20 20 20 | 20 3a 20 28 6f 70 74 69 |ttern | : (opti|
|00000930| 6f 6e 61 6c 29 20 65 78 | 70 72 65 73 73 69 6f 6e |onal) ex|pression|
|00000940| 20 77 68 69 63 68 20 74 | 68 65 20 66 69 6c 65 73 | which t|he files|
|00000950| 20 22 0a 09 09 20 20 20 | 20 20 20 20 20 20 20 20 | "... | |
|00000960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 74 6f | | "to|
|00000980| 20 6c 69 73 74 20 6d 75 | 73 74 5c 6e 22 0a 20 20 | list mu|st\n". |
|00000990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 20 | | " |
|000009a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009b0| 20 20 20 6d 61 74 63 68 | 5c 6e 22 0a 09 09 22 5c | match|\n"..."\|
|000009c0| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|000009d0| 20 20 20 22 54 68 65 20 | 63 6f 6e 74 65 6e 74 73 | "The |contents|
|000009e0| 20 6f 66 20 74 68 65 20 | 62 61 63 6b 75 70 20 61 | of the |backup a|
|000009f0| 72 65 20 6c 69 73 74 65 | 64 2e 20 4e 6f 74 65 20 |re liste|d. Note |
|00000a00| 74 68 61 74 20 74 68 65 | 20 22 0a 09 09 20 20 20 |that the| "... |
|00000a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a30| 20 20 20 20 20 22 66 69 | 6c 65 73 20 6d 61 79 20 | "fi|les may |
|00000a40| 61 70 70 65 61 72 20 61 | 73 5c 6e 22 0a 20 20 20 |appear a|s\n". |
|00000a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 63 6f | | "co|
|00000a60| 6d 70 72 65 73 73 65 64 | 20 28 2e 7a 20 65 78 74 |mpressed| (.z ext|
|00000a70| 65 6e 73 69 6f 6e 29 3b | 20 62 75 74 20 77 6f 75 |ension);| but wou|
|00000a80| 6c 64 20 62 65 20 72 65 | 73 74 6f 72 65 64 20 28 |ld be re|stored (|
|00000a90| 73 65 65 20 22 0a 09 09 | 20 20 20 20 20 20 20 20 |see "...| |
|00000aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ac0| 22 74 68 65 20 70 72 6f | 67 72 61 6d 5c 6e 22 0a |"the pro|gram\n".|
|00000ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ae0| 22 72 65 73 74 6f 72 65 | 62 61 63 6b 75 70 29 20 |"restore|backup) |
|00000af0| 61 73 20 6e 6f 72 6d 61 | 6c 20 66 69 6c 65 73 2e |as norma|l files.|
|00000b00| 5c 6e 22 0a 09 09 22 5c | 6e 22 29 3b 0a 20 20 20 |\n"..."\|n");. |
|00000b10| 20 20 20 20 20 65 78 69 | 74 20 28 31 29 3b 0a 20 | exi|t (1);. |
|00000b20| 20 20 20 7d 0a 0a 20 20 | 20 20 67 65 74 73 69 7a | }.. | getsiz|
|00000b30| 65 66 6c 61 67 20 28 65 | 6c 65 6d 65 6e 74 20 28 |eflag (e|lement (|
|00000b40| 30 2c 20 61 72 67 76 29 | 29 3b 0a 09 0a 20 20 20 |0, argv)|);... |
|00000b50| 20 62 61 63 6b 75 70 66 | 69 6c 65 20 3d 20 65 6c | backupf|ile = el|
|00000b60| 65 6d 65 6e 74 20 28 31 | 2c 20 61 72 67 76 29 3b |ement (1|, argv);|
|00000b70| 0a 20 20 20 20 69 66 20 | 28 61 72 67 63 20 3d 3d |. if |(argc ==|
|00000b80| 20 33 29 0a 20 20 20 20 | 20 20 20 20 70 61 74 74 | 3). | patt|
|00000b90| 65 72 6e 20 3d 20 65 6c | 65 6d 65 6e 74 20 28 32 |ern = el|ement (2|
|00000ba0| 2c 20 61 72 67 76 29 3b | 0a 09 0a 20 20 20 20 69 |, argv);|... i|
|00000bb0| 66 20 28 70 61 74 74 65 | 72 6e 29 0a 20 20 20 20 |f (patte|rn). |
|00000bc0| 20 20 20 20 65 78 65 63 | 20 28 22 61 66 69 6f 22 | exec| ("afio"|
|00000bd0| 2c 20 22 2d 74 22 2c 20 | 73 69 7a 65 66 6c 61 67 |, "-t", |sizeflag|
|00000be0| 2c 20 22 2d 76 22 2c 20 | 22 2d 79 22 2c 20 0a 09 |, "-v", |"-y", ..|
|00000bf0| 20 20 20 20 20 20 20 20 | 22 27 22 20 2b 20 70 61 | |"'" + pa|
|00000c00| 74 74 65 72 6e 20 2b 20 | 22 27 22 2c 20 62 61 63 |ttern + |"'", bac|
|00000c10| 6b 75 70 66 69 6c 65 29 | 3b 0a 20 20 20 20 65 6c |kupfile)|;. el|
|00000c20| 73 65 20 20 20 20 0a 20 | 20 20 20 20 20 20 20 65 |se . | e|
|00000c30| 78 65 63 20 28 22 61 66 | 69 6f 22 2c 20 22 2d 74 |xec ("af|io", "-t|
|00000c40| 22 2c 20 73 69 7a 65 66 | 6c 61 67 2c 20 22 2d 76 |", sizef|lag, "-v|
|00000c50| 22 2c 20 62 61 63 6b 75 | 70 66 69 6c 65 29 3b 0a |", backu|pfile);.|
|00000c60| 20 20 20 20 0a 20 20 20 | 20 65 78 69 74 20 28 30 | . | exit (0|
|00000c70| 29 3b 0a 7d 0a 0a 20 20 | 20 20 0a 20 20 20 20 00 |);.}.. | . .|
|00000c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 62 61 63 6b 75 70 2f 61 | 66 69 6f 73 63 72 69 70 |backup/a|fioscrip|
|00000e10| 74 73 2f 72 65 73 74 6f | 72 65 62 61 63 6b 75 70 |ts/resto|rebackup|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 31 30 30 37 | 35 35 20 00 20 20 20 20 |....1007|55 . |
|00000e70| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000e80| 20 20 20 33 31 33 36 20 | 20 35 35 33 37 30 35 35 | 3136 | 5537055|
|00000e90| 30 36 37 20 20 31 35 35 | 34 36 00 20 30 00 00 00 |067 155|46. 0...|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00001010| 2f 69 63 6d 61 6b 65 20 | 2d 71 69 0a 0a 23 64 65 |/icmake |-qi..#de|
|00001020| 66 69 6e 65 20 56 45 52 | 20 20 20 20 20 20 20 20 |fine VER| |
|00001030| 20 20 20 20 20 22 31 2e | 30 30 22 0a 0a 73 74 72 | "1.|00"..str|
|00001040| 69 6e 67 20 0a 20 20 20 | 20 73 69 7a 65 66 6c 61 |ing . | sizefla|
|00001050| 67 3b 0a 20 20 20 20 0a | 76 6f 69 64 20 67 65 74 |g;. .|void get|
|00001060| 73 69 7a 65 66 6c 61 67 | 20 28 73 74 72 69 6e 67 |sizeflag| (string|
|00001070| 20 61 76 30 29 0a 7b 0a | 20 20 20 20 73 74 72 69 | av0).{.| stri|
|00001080| 6e 67 0a 20 20 20 20 20 | 20 20 20 69 6e 66 3b 0a |ng. | inf;.|
|00001090| 20 20 20 20 6c 69 73 74 | 0a 20 20 20 20 20 20 20 | list|. |
|000010a0| 20 69 6e 70 75 74 3b 0a | 09 0a 20 20 20 20 69 6e | input;.|.. in|
|000010b0| 66 20 3d 20 63 68 61 6e | 67 65 5f 62 61 73 65 20 |f = chan|ge_base |
|000010c0| 28 61 76 30 2c 20 22 73 | 69 7a 65 22 29 3b 0a 20 |(av0, "s|ize");. |
|000010d0| 20 20 20 69 6e 66 20 3d | 20 63 68 61 6e 67 65 5f | inf =| change_|
|000010e0| 65 78 74 20 20 28 69 6e | 66 2c 20 22 22 29 3b 0a |ext (in|f, "");.|
|000010f0| 20 20 20 20 0a 20 20 20 | 20 69 66 20 28 69 6e 70 | . | if (inp|
|00001100| 75 74 20 3d 20 66 67 65 | 74 73 20 28 69 6e 66 2c |ut = fge|ts (inf,|
|00001110| 20 30 29 29 0a 20 20 20 | 20 20 20 20 20 73 69 7a | 0)). | siz|
|00001120| 65 66 6c 61 67 20 3d 20 | 22 2d 73 20 22 20 2b 20 |eflag = |"-s " + |
|00001130| 65 6c 65 6d 65 6e 74 20 | 28 30 2c 20 73 74 72 74 |element |(0, strt|
|00001140| 6f 6b 20 28 65 6c 65 6d | 65 6e 74 20 28 30 2c 20 |ok (elem|ent (0, |
|00001150| 69 6e 70 75 74 29 2c 20 | 22 20 5c 74 5c 6e 22 29 |input), |" \t\n")|
|00001160| 29 3b 0a 7d 0a 0a 76 6f | 69 64 20 6d 61 69 6e 20 |);.}..vo|id main |
|00001170| 28 69 6e 74 20 61 72 67 | 63 2c 20 6c 69 73 74 20 |(int arg|c, list |
|00001180| 61 72 67 76 29 0a 7b 0a | 20 20 20 20 73 74 72 69 |argv).{.| stri|
|00001190| 6e 67 0a 09 62 61 63 6b | 75 70 66 69 6c 65 2c 0a |ng..back|upfile,.|
|000011a0| 09 65 78 70 72 65 73 73 | 69 6f 6e 3b 0a 09 0a 20 |.express|ion;... |
|000011b0| 20 20 20 65 63 68 6f 20 | 28 30 29 3b 0a 09 0a 20 | echo |(0);... |
|000011c0| 20 20 20 69 66 20 28 61 | 72 67 63 20 21 3d 20 33 | if (a|rgc != 3|
|000011d0| 29 0a 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 |). {.| |
|000011e0| 70 72 69 6e 74 66 20 28 | 22 5c 6e 22 0a 09 20 20 |printf (|"\n".. |
|000011f0| 20 20 20 20 20 20 22 49 | 43 43 45 20 42 61 63 6b | "I|CCE Back|
|00001200| 75 70 20 52 65 73 74 6f | 72 65 72 20 20 56 22 20 |up Resto|rer V" |
|00001210| 56 45 52 20 22 5c 6e 22 | 0a 09 09 22 43 6f 70 79 |VER "\n"|..."Copy|
|00001220| 72 69 67 68 74 20 28 63 | 29 20 49 43 43 45 20 31 |right (c|) ICCE 1|
|00001230| 39 39 34 2e 20 41 6c 6c | 20 72 69 67 68 74 73 20 |994. All| rights |
|00001240| 72 65 73 65 72 76 65 64 | 2e 5c 6e 22 0a 09 09 22 |reserved|.\n"..."|
|00001250| 5c 6e 22 0a 09 09 22 72 | 65 73 74 6f 72 65 62 61 |\n"..."r|estoreba|
|00001260| 63 6b 75 70 20 62 79 20 | 4b 61 72 65 6c 20 4b 75 |ckup by |Karel Ku|
|00001270| 62 61 74 2e 5c 6e 22 0a | 09 09 22 5c 6e 22 0a 09 |bat.\n".|.."\n"..|
|00001280| 09 22 55 73 61 67 65 3a | 20 72 65 73 74 6f 72 65 |."Usage:| restore|
|00001290| 62 61 63 6b 75 70 20 62 | 61 63 6b 75 70 66 69 6c |backup b|ackupfil|
|000012a0| 65 20 70 61 74 74 65 72 | 6e 5c 6e 22 0a 09 09 22 |e patter|n\n"..."|
|000012b0| 77 68 65 72 65 3a 5c 6e | 22 0a 20 20 20 20 20 20 |where:\n|". |
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 22 20 20 20 20 20 | | " |
|000012d0| 20 20 62 61 63 6b 75 70 | 66 69 6c 65 20 3a 20 74 | backup|file : t|
|000012e0| 68 65 20 61 66 69 6f 27 | 64 20 62 61 63 6b 75 70 |he afio'|d backup|
|000012f0| 5c 6e 22 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |\n". | |
|00001300| 20 20 20 20 22 20 20 20 | 20 20 20 20 70 61 74 74 | " | patt|
|00001310| 65 72 6e 20 20 20 20 3a | 20 65 78 70 72 65 73 73 |ern :| express|
|00001320| 69 6f 6e 20 77 68 69 63 | 68 20 66 69 6c 65 73 20 |ion whic|h files |
|00001330| 74 6f 20 22 0a 09 09 20 | 20 20 20 20 20 20 20 20 |to "... | |
|00001340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001350| 20 20 20 20 20 20 20 22 | 72 65 73 74 6f 72 65 20 | "|restore |
|00001360| 6d 75 73 74 20 6d 61 74 | 63 68 5c 6e 22 0a 20 20 |must mat|ch\n". |
|00001370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 5c | | "\|
|00001380| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|00001390| 20 20 20 22 54 68 65 20 | 63 6f 6e 74 65 6e 74 73 | "The |contents|
|000013a0| 20 6f 66 20 61 6e 20 61 | 72 63 68 69 76 65 2c 20 | of an a|rchive, |
|000013b0| 63 72 65 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |created |with the|
|000013c0| 20 70 72 6f 67 72 61 6d | 20 22 0a 09 09 20 20 20 | program| "... |
|000013d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 6d 61 | | "ma|
|000013f0| 6b 65 62 61 63 6b 75 70 | 2c 20 61 72 65 5c 6e 22 |kebackup|, are\n"|
|00001400| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001410| 20 22 72 65 73 74 6f 72 | 65 64 20 72 65 6c 61 74 | "restor|ed relat|
|00001420| 69 76 65 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |ive to t|he curre|
|00001430| 6e 74 20 77 6f 72 6b 69 | 6e 67 20 64 69 72 65 63 |nt worki|ng direc|
|00001440| 74 6f 72 79 2e 20 22 0a | 09 09 20 20 20 20 20 20 |tory. ".|.. |
|00001450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001460| 20 20 20 20 20 20 20 20 | 20 20 22 49 66 20 74 68 | | "If th|
|00001470| 65 20 61 72 63 68 69 76 | 65 20 66 69 6c 65 73 5c |e archiv|e files\|
|00001480| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|00001490| 20 20 20 22 77 65 72 65 | 20 63 6f 6d 70 72 65 73 | "were| compres|
|000014a0| 73 65 64 2c 20 74 68 65 | 79 20 61 72 65 20 75 6e |sed, the|y are un|
|000014b0| 63 6f 6d 70 72 65 73 73 | 65 64 20 77 68 65 6e 20 |compress|ed when |
|000014c0| 72 65 73 74 6f 72 69 6e | 67 2e 5c 6e 22 0a 20 20 |restorin|g.\n". |
|000014d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 54 | | "T|
|000014e0| 68 65 20 66 69 6c 65 73 | 20 77 68 69 63 68 20 61 |he files| which a|
|000014f0| 72 65 20 72 65 73 74 6f | 72 65 64 20 6d 75 73 74 |re resto|red must|
|00001500| 20 6d 61 74 63 68 20 74 | 68 65 20 22 0a 09 09 20 | match t|he "... |
|00001510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 22 | | "|
|00001530| 70 61 74 74 65 72 6e 3a | 20 75 73 65 20 2a 20 66 |pattern:| use * f|
|00001540| 6f 72 5c 6e 22 0a 20 20 | 20 20 20 20 20 20 20 20 |or\n". | |
|00001550| 20 20 20 20 20 20 22 61 | 6c 6c 20 66 69 6c 65 73 | "a|ll files|
|00001560| 2e 5c 6e 22 0a 09 09 22 | 5c 6e 22 29 3b 0a 20 20 |.\n"..."|\n");. |
|00001570| 20 20 20 20 20 20 65 78 | 69 74 20 28 31 29 3b 0a | ex|it (1);.|
|00001580| 20 20 20 20 7d 0a 0a 20 | 20 20 20 67 65 74 73 69 | }.. | getsi|
|00001590| 7a 65 66 6c 61 67 20 28 | 65 6c 65 6d 65 6e 74 20 |zeflag (|element |
|000015a0| 28 30 2c 20 61 72 67 76 | 29 29 3b 0a 20 20 20 20 |(0, argv|));. |
|000015b0| 62 61 63 6b 75 70 66 69 | 6c 65 20 3d 20 65 6c 65 |backupfi|le = ele|
|000015c0| 6d 65 6e 74 20 28 31 2c | 20 61 72 67 76 29 3b 0a |ment (1,| argv);.|
|000015d0| 20 20 20 20 65 78 70 72 | 65 73 73 69 6f 6e 20 3d | expr|ession =|
|000015e0| 20 65 6c 65 6d 65 6e 74 | 20 28 32 2c 20 61 72 67 | element| (2, arg|
|000015f0| 76 29 3b 0a 20 20 20 20 | 0a 20 20 20 20 65 78 65 |v);. |. exe|
|00001600| 63 20 28 22 61 66 69 6f | 22 2c 20 22 2d 69 20 2d |c ("afio|", "-i -|
|00001610| 5a 20 2d 76 20 2d 79 22 | 2c 20 22 27 22 20 2b 20 |Z -v -y"|, "'" + |
|00001620| 65 78 70 72 65 73 73 69 | 6f 6e 20 2b 20 22 27 22 |expressi|on + "'"|
|00001630| 2c 20 73 69 7a 65 66 6c | 61 67 2c 20 62 61 63 6b |, sizefl|ag, back|
|00001640| 75 70 66 69 6c 65 29 3b | 0a 20 20 20 20 0a 20 20 |upfile);|. . |
|00001650| 20 20 65 78 69 74 20 28 | 30 29 3b 0a 7d 0a 00 00 | exit (|0);.}...|
|00001660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001800| 62 61 63 6b 75 70 2f 61 | 66 69 6f 73 63 72 69 70 |backup/a|fioscrip|
|00001810| 74 73 2f 6d 61 6b 65 62 | 61 63 6b 75 70 00 00 00 |ts/makeb|ackup...|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 31 30 30 37 | 35 35 20 00 20 20 20 20 |....1007|55 . |
|00001870| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00001880| 20 20 20 33 37 33 34 20 | 20 35 35 33 32 37 33 33 | 3734 | 5532733|
|00001890| 37 36 33 20 20 31 35 30 | 30 35 00 20 30 00 00 00 |763 150|05. 0...|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00001a10| 2f 69 63 6d 61 6b 65 20 | 2d 71 69 0a 0a 23 64 65 |/icmake |-qi..#de|
|00001a20| 66 69 6e 65 20 56 45 52 | 20 20 20 20 20 20 20 20 |fine VER| |
|00001a30| 20 20 20 20 20 22 31 2e | 30 30 22 0a 0a 73 74 72 | "1.|00"..str|
|00001a40| 69 6e 67 20 0a 20 20 20 | 20 73 69 7a 65 66 6c 61 |ing . | sizefla|
|00001a50| 67 3b 0a 20 20 20 20 0a | 76 6f 69 64 20 67 65 74 |g;. .|void get|
|00001a60| 73 69 7a 65 66 6c 61 67 | 20 28 73 74 72 69 6e 67 |sizeflag| (string|
|00001a70| 20 61 76 30 29 0a 7b 0a | 20 20 20 20 73 74 72 69 | av0).{.| stri|
|00001a80| 6e 67 0a 20 20 20 20 20 | 20 20 20 69 6e 66 3b 0a |ng. | inf;.|
|00001a90| 20 20 20 20 6c 69 73 74 | 0a 20 20 20 20 20 20 20 | list|. |
|00001aa0| 20 69 6e 70 75 74 3b 0a | 09 0a 20 20 20 20 69 6e | input;.|.. in|
|00001ab0| 66 20 3d 20 63 68 61 6e | 67 65 5f 62 61 73 65 20 |f = chan|ge_base |
|00001ac0| 28 61 76 30 2c 20 22 73 | 69 7a 65 22 29 3b 0a 20 |(av0, "s|ize");. |
|00001ad0| 20 20 20 69 6e 66 20 3d | 20 63 68 61 6e 67 65 5f | inf =| change_|
|00001ae0| 65 78 74 20 20 28 69 6e | 66 2c 20 22 22 29 3b 0a |ext (in|f, "");.|
|00001af0| 20 20 20 20 0a 20 20 20 | 20 69 66 20 28 69 6e 70 | . | if (inp|
|00001b00| 75 74 20 3d 20 66 67 65 | 74 73 20 28 69 6e 66 2c |ut = fge|ts (inf,|
|00001b10| 20 30 29 29 0a 20 20 20 | 20 20 20 20 20 73 69 7a | 0)). | siz|
|00001b20| 65 66 6c 61 67 20 3d 20 | 22 2d 73 20 22 20 2b 20 |eflag = |"-s " + |
|00001b30| 65 6c 65 6d 65 6e 74 20 | 28 30 2c 20 73 74 72 74 |element |(0, strt|
|00001b40| 6f 6b 20 28 65 6c 65 6d | 65 6e 74 20 28 30 2c 20 |ok (elem|ent (0, |
|00001b50| 69 6e 70 75 74 29 2c 20 | 22 20 5c 74 5c 6e 22 29 |input), |" \t\n")|
|00001b60| 29 3b 0a 7d 0a 0a 76 6f | 69 64 20 6d 61 69 6e 20 |);.}..vo|id main |
|00001b70| 28 69 6e 74 20 61 72 67 | 63 2c 20 6c 69 73 74 20 |(int arg|c, list |
|00001b80| 61 72 67 76 29 0a 7b 0a | 20 20 20 20 73 74 72 69 |argv).{.| stri|
|00001b90| 6e 67 0a 20 20 20 20 20 | 20 20 20 6c 69 73 74 66 |ng. | listf|
|00001ba0| 69 6c 65 2c 0a 09 6f 75 | 74 70 75 74 66 69 6c 65 |ile,..ou|tputfile|
|00001bb0| 3b 0a 0a 20 20 20 20 65 | 63 68 6f 20 28 30 29 3b |;.. e|cho (0);|
|00001bc0| 0a 20 20 20 20 0a 20 20 | 20 20 69 66 20 28 61 72 |. . | if (ar|
|00001bd0| 67 63 20 21 3d 20 33 29 | 0a 20 20 20 20 7b 0a 20 |gc != 3)|. {. |
|00001be0| 20 20 20 20 20 20 20 70 | 72 69 6e 74 66 20 28 22 | p|rintf ("|
|00001bf0| 5c 6e 22 0a 09 20 20 20 | 20 20 20 20 20 22 49 43 |\n".. | "IC|
|00001c00| 43 45 20 42 61 63 6b 75 | 70 20 4d 61 6b 65 72 20 |CE Backu|p Maker |
|00001c10| 20 56 22 20 56 45 52 20 | 22 5c 6e 22 0a 09 09 22 | V" VER |"\n"..."|
|00001c20| 43 6f 70 79 72 69 67 68 | 74 20 28 63 29 20 49 43 |Copyrigh|t (c) IC|
|00001c30| 43 45 20 31 39 39 34 2e | 20 41 6c 6c 20 72 69 67 |CE 1994.| All rig|
|00001c40| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 5c 6e 22 |hts rese|rved.\n"|
|00001c50| 0a 09 09 22 5c 6e 22 0a | 09 09 22 6d 61 6b 65 62 |..."\n".|.."makeb|
|00001c60| 61 63 6b 75 70 20 62 79 | 20 4b 61 72 65 6c 20 4b |ackup by| Karel K|
|00001c70| 75 62 61 74 2e 5c 6e 22 | 0a 09 09 22 5c 6e 22 0a |ubat.\n"|..."\n".|
|00001c80| 09 09 22 55 73 61 67 65 | 3a 20 6d 61 6b 65 62 61 |.."Usage|: makeba|
|00001c90| 63 6b 75 70 20 6c 69 73 | 74 66 69 6c 65 20 6f 75 |ckup lis|tfile ou|
|00001ca0| 74 70 75 74 66 69 6c 65 | 5c 6e 22 0a 09 09 22 77 |tputfile|\n"..."w|
|00001cb0| 68 65 72 65 3a 5c 6e 22 | 0a 20 20 20 20 20 20 20 |here:\n"|. |
|00001cc0| 20 20 20 20 20 20 20 20 | 20 22 20 20 20 20 20 20 | | " |
|00001cd0| 20 6c 69 73 74 66 69 6c | 65 20 20 20 3a 20 66 69 | listfil|e : fi|
|00001ce0| 6c 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 74 68 |le conta|ining th|
|00001cf0| 65 20 6c 69 73 74 20 6f | 66 20 66 69 6c 65 73 20 |e list o|f files |
|00001d00| 22 0a 09 09 20 20 20 20 | 20 20 20 20 20 20 20 20 |"... | |
|00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 74 6f 20 | | "to |
|00001d30| 62 61 63 6b 75 70 5c 6e | 22 0a 20 20 20 20 20 20 |backup\n|". |
|00001d40| 20 20 20 20 20 20 20 20 | 20 20 22 20 20 20 20 20 | | " |
|00001d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | | (|
|00001d60| 73 65 65 20 74 68 65 20 | 62 75 69 6c 64 6c 69 73 |see the |buildlis|
|00001d70| 74 20 70 72 6f 67 72 61 | 6d 29 5c 6e 22 0a 20 20 |t progra|m)\n". |
|00001d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 20 | | " |
|00001d90| 20 20 20 20 20 20 6f 75 | 74 70 75 74 66 69 6c 65 | ou|tputfile|
|00001da0| 20 3a 20 74 68 65 20 66 | 69 6c 65 20 74 6f 20 72 | : the f|ile to r|
|00001db0| 65 63 65 69 76 65 20 74 | 68 65 20 61 66 69 6f 27 |eceive t|he afio'|
|00001dc0| 64 20 62 61 63 6b 75 70 | 5c 6e 22 0a 09 09 22 5c |d backup|\n"..."\|
|00001dd0| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|00001de0| 20 20 20 22 54 68 65 20 | 66 69 6c 65 73 20 6c 69 | "The |files li|
|00001df0| 73 74 65 64 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |sted in |the list|
|00001e00| 66 69 6c 65 20 61 72 65 | 20 77 72 69 74 74 65 6e |file are| written|
|00001e10| 20 74 6f 20 74 68 65 20 | 22 0a 09 09 20 20 20 20 | to the |"... |
|00001e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e40| 20 20 20 20 22 6f 75 74 | 70 75 74 66 69 6c 65 2e | "out|putfile.|
|00001e50| 5c 6e 22 0a 09 09 22 5c | 6e 22 29 3b 0a 20 20 20 |\n"..."\|n");. |
|00001e60| 20 20 20 20 20 65 78 69 | 74 20 28 31 29 3b 0a 20 | exi|t (1);. |
|00001e70| 20 20 20 7d 0a 0a 20 20 | 20 20 67 65 74 73 69 7a | }.. | getsiz|
|00001e80| 65 66 6c 61 67 20 28 65 | 6c 65 6d 65 6e 74 20 28 |eflag (e|lement (|
|00001e90| 30 2c 20 61 72 67 76 29 | 29 3b 0a 09 0a 20 20 20 |0, argv)|);... |
|00001ea0| 20 6c 69 73 74 66 69 6c | 65 20 20 20 3d 20 65 6c | listfil|e = el|
|00001eb0| 65 6d 65 6e 74 20 28 31 | 2c 20 61 72 67 76 29 3b |ement (1|, argv);|
|00001ec0| 0a 20 20 20 20 6f 75 74 | 70 75 74 66 69 6c 65 20 |. out|putfile |
|00001ed0| 3d 20 65 6c 65 6d 65 6e | 74 20 28 32 2c 20 61 72 |= elemen|t (2, ar|
|00001ee0| 67 76 29 3b 0a 20 20 20 | 20 0a 20 20 20 20 69 66 |gv);. | . if|
|00001ef0| 20 28 21 20 65 78 69 73 | 74 73 20 28 6c 69 73 74 | (! exis|ts (list|
|00001f00| 66 69 6c 65 29 29 0a 20 | 20 20 20 7b 0a 20 20 20 |file)). | {. |
|00001f10| 20 20 20 20 20 70 72 69 | 6e 74 66 20 28 22 6d 61 | pri|ntf ("ma|
|00001f20| 6b 65 62 61 63 6b 75 70 | 3a 20 6c 69 73 74 20 66 |kebackup|: list f|
|00001f30| 69 6c 65 20 22 2c 20 6c | 69 73 74 66 69 6c 65 2c |ile ", l|istfile,|
|00001f40| 20 22 6e 6f 74 20 66 6f | 75 6e 64 5c 6e 22 29 3b | "not fo|und\n");|
|00001f50| 0a 09 65 78 69 74 20 28 | 31 29 3b 0a 20 20 20 20 |..exit (|1);. |
|00001f60| 7d 0a 20 20 20 20 0a 20 | 20 20 20 69 66 20 28 20 |}. . | if ( |
|00001f70| 28 69 6e 74 29 20 65 6c | 65 6d 65 6e 74 20 28 31 |(int) el|ement (1|
|00001f80| 2c 20 73 74 61 74 20 28 | 6c 69 73 74 66 69 6c 65 |, stat (|listfile|
|00001f90| 29 29 20 3d 3d 20 30 20 | 29 0a 20 20 20 20 7b 0a |)) == 0 |). {.|
|00001fa0| 20 20 20 20 20 20 20 20 | 70 72 69 6e 74 66 20 28 | |printf (|
|00001fb0| 22 6d 61 6b 65 62 61 63 | 6b 75 70 3a 20 65 6d 70 |"makebac|kup: emp|
|00001fc0| 74 79 20 6c 69 73 74 20 | 66 69 6c 65 20 22 2c 20 |ty list |file ", |
|00001fd0| 6c 69 73 74 66 69 6c 65 | 2c 20 22 5c 6e 22 0a 09 |listfile|, "\n"..|
|00001fe0| 20 20 20 20 20 20 20 20 | 22 49 66 20 79 6f 75 20 | |"If you |
|00001ff0| 61 72 65 20 6d 61 6b 69 | 6e 67 20 61 6e 20 69 6e |are maki|ng an in|
|00002000| 63 72 65 6d 65 6e 74 61 | 6c 20 62 61 63 6b 75 70 |crementa|l backup|
|00002010| 2c 20 6d 61 79 62 65 20 | 74 68 65 72 65 27 73 20 |, maybe |there's |
|00002020| 22 0a 09 09 20 20 20 20 | 20 20 20 20 20 20 20 20 |"... | |
|00002030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002040| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 6e 6f 20 | | "no |
|00002050| 6e 65 65 64 3f 5c 6e 22 | 29 3b 0a 20 20 20 20 20 |need?\n"|);. |
|00002060| 20 20 20 65 78 65 63 20 | 28 22 72 6d 22 2c 20 22 | exec |("rm", "|
|00002070| 2d 66 22 2c 20 6c 69 73 | 74 66 69 6c 65 29 3b 0a |-f", lis|tfile);.|
|00002080| 09 65 78 69 74 20 28 31 | 29 3b 0a 20 20 20 20 7d |.exit (1|);. }|
|00002090| 0a 20 20 20 20 0a 20 20 | 20 20 69 66 20 28 65 78 |. . | if (ex|
|000020a0| 65 63 20 28 50 5f 4e 4f | 43 48 45 43 4b 2c 20 22 |ec (P_NO|CHECK, "|
|000020b0| 61 77 6b 22 2c 20 22 27 | 7b 70 72 69 6e 74 20 24 |awk", "'|{print $|
|000020c0| 31 7d 27 22 2c 20 6c 69 | 73 74 66 69 6c 65 2c 20 |1}'", li|stfile, |
|000020d0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000020e0| 20 22 7c 22 2c 20 22 61 | 66 69 6f 22 2c 20 73 69 | "|", "a|fio", si|
|000020f0| 7a 65 66 6c 61 67 2c 20 | 22 2d 5a 20 2d 76 20 2d |zeflag, |"-Z -v -|
|00002100| 6f 22 2c 20 6f 75 74 70 | 75 74 66 69 6c 65 29 0a |o", outp|utfile).|
|00002110| 20 20 20 20 20 20 20 29 | 0a 20 20 20 20 7b 0a 20 | )|. {. |
|00002120| 20 20 20 20 20 20 20 70 | 72 69 6e 74 66 20 28 22 | p|rintf ("|
|00002130| 54 68 65 20 62 61 63 6b | 75 70 20 73 68 6f 77 73 |The back|up shows|
|00002140| 20 73 6f 6d 65 20 66 61 | 75 6c 74 21 5c 6e 22 0a | some fa|ult!\n".|
|00002150| 09 20 20 20 20 20 20 20 | 20 22 43 6f 72 72 65 63 |. | "Correc|
|00002160| 74 20 74 68 65 20 70 72 | 6f 62 6c 65 6d 20 61 6e |t the pr|oblem an|
|00002170| 64 20 72 65 74 72 79 2e | 20 4c 69 73 74 20 66 69 |d retry.| List fi|
|00002180| 6c 65 20 64 65 6c 65 74 | 65 64 2e 5c 6e 22 29 3b |le delet|ed.\n");|
|00002190| 0a 20 20 20 20 20 20 20 | 20 65 78 65 63 20 28 22 |. | exec ("|
|000021a0| 72 6d 22 2c 20 22 2d 66 | 22 2c 20 6c 69 73 74 66 |rm", "-f|", listf|
|000021b0| 69 6c 65 29 3b 0a 09 65 | 78 69 74 20 28 31 29 3b |ile);..e|xit (1);|
|000021c0| 0a 20 20 20 20 7d 0a 20 | 20 20 20 0a 20 20 20 20 |. }. | . |
|000021d0| 65 78 69 74 20 28 30 29 | 3b 0a 7d 0a 00 00 00 00 |exit (0)|;.}.....|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 62 61 63 6b 75 70 2f 62 | 61 63 6b 75 70 00 00 00 |backup/b|ackup...|
|00002210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 31 30 30 37 | 35 35 20 00 20 20 20 20 |....1007|55 . |
|00002270| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00002280| 20 20 31 31 31 36 31 20 | 20 35 35 37 36 37 37 36 | 11161 | 5576776|
|00002290| 32 37 37 20 20 31 31 36 | 35 31 00 20 30 00 00 00 |277 116|51. 0...|
|000022a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00002310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002320| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00002410| 2f 69 63 6d 61 6b 65 20 | 2d 71 69 0a 0a 23 64 65 |/icmake |-qi..#de|
|00002420| 66 69 6e 65 20 56 45 52 | 20 20 20 20 20 20 20 20 |fine VER| |
|00002430| 20 20 20 20 20 22 31 2e | 30 33 22 0a 23 64 65 66 | "1.|03".#def|
|00002440| 69 6e 65 20 44 45 46 41 | 55 4c 54 5f 48 4f 4d 45 |ine DEFA|ULT_HOME|
|00002450| 20 20 20 20 22 2f 75 73 | 72 2f 6c 6f 63 61 6c 2f | "/us|r/local/|
|00002460| 65 74 63 2f 62 61 63 6b | 75 70 22 0a 0a 76 6f 69 |etc/back|up"..voi|
|00002470| 64 20 75 73 61 67 65 20 | 28 29 0a 7b 0a 20 20 20 |d usage |().{. |
|00002480| 20 70 72 69 6e 74 66 20 | 28 0a 22 5c 6e 22 20 20 | printf |(."\n" |
|00002490| 20 20 0a 22 49 43 43 45 | 20 42 61 63 6b 75 70 20 | ."ICCE| Backup |
|000024a0| 55 74 69 6c 69 74 79 20 | 20 56 22 20 56 45 52 20 |Utility | V" VER |
|000024b0| 22 5c 6e 22 0a 22 43 6f | 70 79 72 69 67 68 74 20 |"\n"."Co|pyright |
|000024c0| 28 63 29 20 49 43 43 45 | 20 31 39 39 34 2e 20 41 |(c) ICCE| 1994. A|
|000024d0| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|000024e0| 65 64 2e 5c 6e 22 0a 22 | 5c 6e 22 0a 22 62 61 63 |ed.\n"."|\n"."bac|
|000024f0| 6b 75 70 20 62 79 20 4b | 61 72 65 6c 20 4b 75 62 |kup by K|arel Kub|
|00002500| 61 74 2e 5c 6e 22 0a 22 | 5c 6e 22 0a 22 55 73 61 |at.\n"."|\n"."Usa|
|00002510| 67 65 3a 20 62 61 63 6b | 75 70 20 61 63 74 69 6f |ge: back|up actio|
|00002520| 6e 20 5b 61 72 67 75 6d | 65 6e 74 73 5d 5c 6e 22 |n [argum|ents]\n"|
|00002530| 0a 22 77 68 65 72 65 20 | 61 63 74 69 6f 6e 20 61 |."where |action a|
|00002540| 6e 64 20 61 72 67 75 6d | 65 6e 74 73 20 61 72 65 |nd argum|ents are|
|00002550| 3a 5c 6e 22 0a 22 20 20 | 20 20 20 2d 66 75 6c 6c |:\n"." | -full|
|00002560| 20 76 6f 6c 75 6d 65 20 | 6f 75 74 70 75 74 66 69 | volume |outputfi|
|00002570| 6c 65 20 20 20 20 20 20 | 20 20 3a 20 6d 61 6b 65 |le | : make|
|00002580| 73 20 61 20 66 75 6c 6c | 20 62 61 63 6b 75 70 20 |s a full| backup |
|00002590| 6f 66 20 61 20 76 6f 6c | 75 6d 65 20 74 6f 5c 6e |of a vol|ume to\n|
|000025a0| 22 0a 22 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |"." | |
|000025b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000025c0| 20 20 20 20 20 20 20 20 | 20 74 68 65 20 67 69 76 | | the giv|
|000025d0| 65 6e 20 6f 75 74 70 75 | 74 20 66 69 6c 65 5c 6e |en outpu|t file\n|
|000025e0| 22 0a 22 20 20 20 20 20 | 2d 69 6e 63 72 65 6d 65 |"." |-increme|
|000025f0| 6e 74 61 6c 20 76 6f 6c | 75 6d 65 20 6f 75 74 70 |ntal vol|ume outp|
|00002600| 75 74 66 69 6c 65 20 3a | 20 6d 61 6b 65 73 20 61 |utfile :| makes a|
|00002610| 6e 20 69 6e 63 72 65 6d | 65 6e 74 61 6c 20 62 61 |n increm|ental ba|
|00002620| 63 6b 75 70 20 6f 66 20 | 61 6c 6c 5c 6e 22 0a 22 |ckup of |all\n"."|
|00002630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002650| 20 20 20 20 20 20 63 68 | 61 6e 67 65 64 20 66 69 | ch|anged fi|
|00002660| 6c 65 73 20 73 69 6e 63 | 65 20 74 68 65 20 6c 61 |les sinc|e the la|
|00002670| 73 74 20 66 75 6c 6c 5c | 6e 22 0a 22 20 20 20 20 |st full\|n"." |
|00002680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026a0| 20 20 62 61 63 6b 75 70 | 20 6f 66 20 74 68 65 20 | backup| of the |
|000026b0| 73 61 6d 65 20 76 6f 6c | 75 6d 65 5c 6e 22 0a 22 |same vol|ume\n"."|
|000026c0| 20 20 20 20 20 2d 62 61 | 63 6b 75 70 73 20 20 20 | -ba|ckups |
|000026d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026e0| 20 20 20 20 3a 20 6c 69 | 73 74 73 20 70 65 72 66 | : li|sts perf|
|000026f0| 6f 72 6d 65 64 20 62 61 | 63 6b 75 70 73 5c 6e 22 |ormed ba|ckups\n"|
|00002700| 0a 22 20 20 20 20 20 2d | 77 68 69 63 68 20 5b 70 |." -|which [p|
|00002710| 61 74 74 65 72 6e 5d 20 | 20 20 20 20 20 20 20 20 |attern] | |
|00002720| 20 20 20 20 20 20 3a 20 | 73 65 61 72 63 68 65 73 | : |searches|
|00002730| 20 66 6f 72 20 61 20 70 | 61 74 74 65 72 6e 20 6f | for a p|attern o|
|00002740| 72 20 61 6c 6c 20 66 69 | 6c 65 73 5c 6e 22 0a 22 |r all fi|les\n"."|
|00002750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002770| 20 20 20 20 20 20 69 6e | 20 74 68 65 20 62 61 63 | in| the bac|
|00002780| 6b 75 70 20 6c 69 73 74 | 20 66 69 6c 65 73 5c 6e |kup list| files\n|
|00002790| 22 0a 22 20 20 20 20 20 | 2d 76 65 72 62 6f 73 65 |"." |-verbose|
|000027a0| 20 69 6e 70 75 74 66 69 | 6c 65 20 5b 70 61 74 74 | inputfi|le [patt|
|000027b0| 65 72 6e 5d 20 20 20 3a | 20 73 65 61 72 63 68 65 |ern] :| searche|
|000027c0| 73 20 66 6f 72 20 61 20 | 70 61 74 74 65 72 6e 20 |s for a |pattern |
|000027d0| 6f 72 20 61 6c 6c 20 66 | 69 6c 65 73 5c 6e 22 0a |or all f|iles\n".|
|000027e0| 22 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |" | |
|000027f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002800| 20 20 20 20 20 20 20 69 | 6e 20 74 68 65 20 62 61 | i|n the ba|
|00002810| 63 6b 75 70 20 6f 6e 20 | 74 68 65 20 6f 75 74 70 |ckup on |the outp|
|00002820| 75 74 20 66 69 6c 65 5c | 6e 22 0a 22 20 20 20 20 |ut file\|n"." |
|00002830| 20 2d 72 65 73 74 6f 72 | 65 20 69 6e 70 75 74 66 | -restor|e inputf|
|00002840| 69 6c 65 20 70 61 74 74 | 65 72 6e 20 20 20 20 20 |ile patt|ern |
|00002850| 3a 20 72 65 73 74 6f 72 | 65 73 20 66 69 6c 65 73 |: restor|es files|
|00002860| 20 6d 61 74 63 68 69 6e | 67 20 74 68 65 20 70 61 | matchin|g the pa|
|00002870| 74 74 65 72 6e 5c 6e 22 | 0a 22 20 20 20 20 20 20 |ttern\n"|." |
|00002880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000028a0| 72 65 6c 61 74 69 76 65 | 20 74 6f 20 74 68 65 20 |relative| to the |
|000028b0| 63 75 72 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 |current |director|
|000028c0| 79 5c 6e 22 0a 22 5c 6e | 22 0a 20 20 20 20 29 3b |y\n"."\n|". );|
|000028d0| 0a 20 20 20 20 65 78 69 | 74 20 28 31 29 3b 0a 7d |. exi|t (1);.}|
|000028e0| 0a 0a 73 74 72 69 6e 67 | 0a 20 20 20 20 68 6f 6d |..string|. hom|
|000028f0| 65 3b 0a 20 20 20 20 0a | 76 6f 69 64 20 68 6f 6d |e;. .|void hom|
|00002900| 65 65 6e 76 20 28 6c 69 | 73 74 20 65 6e 76 70 29 |eenv (li|st envp)|
|00002910| 0a 7b 0a 20 20 20 20 69 | 6e 74 0a 20 20 20 20 20 |.{. i|nt. |
|00002920| 20 20 20 69 3b 0a 09 0a | 20 20 20 20 66 6f 72 20 | i;...| for |
|00002930| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 73 69 7a 65 |(i = 0; |i < size|
|00002940| 6f 66 20 28 65 6e 76 70 | 29 3b 20 69 20 2b 3d 20 |of (envp|); i += |
|00002950| 32 29 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 65 |2). | if (e|
|00002960| 6c 65 6d 65 6e 74 20 28 | 69 2c 20 65 6e 76 70 29 |lement (|i, envp)|
|00002970| 20 3d 3d 20 22 42 41 43 | 4b 55 50 5f 48 4f 4d 45 | == "BAC|KUP_HOME|
|00002980| 22 29 0a 09 7b 0a 09 20 | 20 20 20 68 6f 6d 65 20 |")..{.. | home |
|00002990| 3d 20 65 6c 65 6d 65 6e | 74 20 28 69 20 2b 20 31 |= elemen|t (i + 1|
|000029a0| 2c 20 65 6e 76 70 29 3b | 0a 09 20 20 20 20 72 65 |, envp);|.. re|
|000029b0| 74 75 72 6e 3b 0a 09 7d | 0a 09 0a 20 20 20 20 68 |turn;..}|... h|
|000029c0| 6f 6d 65 20 3d 20 44 45 | 46 41 55 4c 54 5f 48 4f |ome = DE|FAULT_HO|
|000029d0| 4d 45 3b 0a 20 20 20 20 | 70 75 74 65 6e 76 20 28 |ME;. |putenv (|
|000029e0| 22 42 41 43 4b 55 50 5f | 48 4f 4d 45 3d 22 20 44 |"BACKUP_|HOME=" D|
|000029f0| 45 46 41 55 4c 54 5f 48 | 4f 4d 45 29 3b 0a 7d 0a |EFAULT_H|OME);.}.|
|00002a00| 0a 76 6f 69 64 20 6e 65 | 65 64 61 72 67 73 20 28 |.void ne|edargs (|
|00002a10| 69 6e 74 20 61 72 67 63 | 2c 20 69 6e 74 20 6d 69 |int argc|, int mi|
|00002a20| 6e 2c 20 69 6e 74 20 6d | 61 78 29 0a 7b 0a 20 20 |n, int m|ax).{. |
|00002a30| 20 20 69 66 20 28 61 72 | 67 63 20 3c 20 6d 69 6e | if (ar|gc < min|
|00002a40| 20 7c 7c 20 61 72 67 63 | 20 3e 20 6d 61 78 29 0a | || argc| > max).|
|00002a50| 20 20 20 20 20 20 20 20 | 75 73 61 67 65 20 28 29 | |usage ()|
|00002a60| 3b 0a 7d 0a 0a 76 6f 69 | 64 20 66 75 6c 6c 20 28 |;.}..voi|d full (|
|00002a70| 69 6e 74 20 61 72 67 63 | 2c 20 6c 69 73 74 20 61 |int argc|, list a|
|00002a80| 72 67 76 29 0a 7b 0a 20 | 20 20 20 6e 65 65 64 61 |rgv).{. | needa|
|00002a90| 72 67 73 20 28 61 72 67 | 63 2c 20 34 2c 20 34 29 |rgs (arg|c, 4, 4)|
|00002aa0| 3b 0a 20 20 20 20 65 78 | 65 63 20 28 68 6f 6d 65 |;. ex|ec (home|
|00002ab0| 20 2b 20 22 2f 62 61 63 | 6b 75 70 73 63 72 69 70 | + "/bac|kupscrip|
|00002ac0| 74 73 2f 72 75 6e 62 61 | 63 6b 75 70 22 2c 20 0a |ts/runba|ckup", .|
|00002ad0| 20 20 20 20 20 20 20 20 | 65 6c 65 6d 65 6e 74 20 | |element |
|00002ae0| 28 32 2c 20 61 72 67 76 | 29 2c 20 65 6c 65 6d 65 |(2, argv|), eleme|
|00002af0| 6e 74 20 28 33 2c 20 61 | 72 67 76 29 29 3b 0a 7d |nt (3, a|rgv));.}|
|00002b00| 20 20 20 20 0a 0a 76 6f | 69 64 20 69 6e 63 72 65 | ..vo|id incre|
|00002b10| 6d 65 6e 74 61 6c 20 28 | 69 6e 74 20 61 72 67 63 |mental (|int argc|
|00002b20| 2c 20 6c 69 73 74 20 61 | 72 67 76 29 0a 7b 0a 20 |, list a|rgv).{. |
|00002b30| 20 20 20 6e 65 65 64 61 | 72 67 73 20 28 61 72 67 | needa|rgs (arg|
|00002b40| 63 2c 20 34 2c 20 34 29 | 3b 09 0a 20 20 20 20 65 |c, 4, 4)|;.. e|
|00002b50| 78 65 63 20 28 68 6f 6d | 65 20 2b 20 22 2f 62 61 |xec (hom|e + "/ba|
|00002b60| 63 6b 75 70 73 63 72 69 | 70 74 73 2f 72 75 6e 62 |ckupscri|pts/runb|
|00002b70| 61 63 6b 75 70 22 2c 20 | 0a 20 20 20 20 20 20 20 |ackup", |. |
|00002b80| 20 22 2d 69 6e 63 72 65 | 6d 65 6e 74 61 6c 22 2c | "-incre|mental",|
|00002b90| 20 65 6c 65 6d 65 6e 74 | 20 28 32 2c 20 61 72 67 | element| (2, arg|
|00002ba0| 76 29 2c 20 65 6c 65 6d | 65 6e 74 20 28 33 2c 20 |v), elem|ent (3, |
|00002bb0| 61 72 67 76 29 29 3b 0a | 7d 0a 0a 76 6f 69 64 20 |argv));.|}..void |
|00002bc0| 77 68 69 63 68 20 28 69 | 6e 74 20 61 72 67 63 2c |which (i|nt argc,|
|00002bd0| 20 6c 69 73 74 20 61 72 | 67 76 29 0a 7b 0a 20 20 | list ar|gv).{. |
|00002be0| 20 20 73 74 72 69 6e 67 | 0a 20 20 20 20 20 20 20 | string|. |
|00002bf0| 20 70 61 74 74 65 72 6e | 3b 0a 09 0a 20 20 20 20 | pattern|;... |
|00002c00| 6e 65 65 64 61 72 67 73 | 20 28 61 72 67 63 2c 20 |needargs| (argc, |
|00002c10| 32 2c 20 33 29 3b 0a 20 | 20 20 20 69 66 20 28 61 |2, 3);. | if (a|
|00002c20| 72 67 63 20 3d 3d 20 33 | 29 0a 20 20 20 20 20 20 |rgc == 3|). |
|00002c30| 20 20 70 61 74 74 65 72 | 6e 20 3d 20 22 27 22 20 | patter|n = "'" |
|00002c40| 2b 20 65 6c 65 6d 65 6e | 74 20 28 32 2c 20 61 72 |+ elemen|t (2, ar|
|00002c50| 67 76 29 20 2b 20 22 27 | 22 3b 0a 20 20 20 20 65 |gv) + "'|";. e|
|00002c60| 78 65 63 20 28 68 6f 6d | 65 20 2b 20 22 2f 62 61 |xec (hom|e + "/ba|
|00002c70| 63 6b 75 70 73 63 72 69 | 70 74 73 2f 6c 69 73 74 |ckupscri|pts/list|
|00002c80| 22 2c 20 70 61 74 74 65 | 72 6e 29 3b 0a 7d 09 0a |", patte|rn);.}..|
|00002c90| 0a 76 6f 69 64 20 62 61 | 63 6b 75 70 73 20 28 69 |.void ba|ckups (i|
|00002ca0| 6e 74 20 61 72 67 63 2c | 20 6c 69 73 74 20 61 72 |nt argc,| list ar|
|00002cb0| 67 76 29 0a 7b 0a 20 20 | 20 20 6e 65 65 64 61 72 |gv).{. | needar|
|00002cc0| 67 73 20 28 61 72 67 63 | 2c 20 32 2c 20 32 29 3b |gs (argc|, 2, 2);|
|00002cd0| 0a 20 20 20 20 65 78 65 | 63 20 28 68 6f 6d 65 20 |. exe|c (home |
|00002ce0| 2b 20 22 2f 62 61 63 6b | 75 70 73 63 72 69 70 74 |+ "/back|upscript|
|00002cf0| 73 2f 6c 69 73 74 62 61 | 63 6b 75 70 73 22 29 3b |s/listba|ckups");|
|00002d00| 0a 7d 0a 0a 76 6f 69 64 | 20 76 65 72 62 6f 73 65 |.}..void| verbose|
|00002d10| 20 28 69 6e 74 20 61 72 | 67 63 2c 20 6c 69 73 74 | (int ar|gc, list|
|00002d20| 20 61 72 67 76 29 0a 7b | 0a 20 20 20 20 73 74 72 | argv).{|. str|
|00002d30| 69 6e 67 0a 20 20 20 20 | 20 20 20 20 70 61 74 74 |ing. | patt|
|00002d40| 65 72 6e 3b 0a 09 0a 20 | 20 20 20 6e 65 65 64 61 |ern;... | needa|
|00002d50| 72 67 73 20 28 61 72 67 | 63 2c 20 33 2c 20 34 29 |rgs (arg|c, 3, 4)|
|00002d60| 3b 0a 20 20 20 20 69 66 | 20 28 61 72 67 63 20 3d |;. if| (argc =|
|00002d70| 3d 20 34 29 0a 20 20 20 | 20 20 20 20 20 70 61 74 |= 4). | pat|
|00002d80| 74 65 72 6e 20 3d 20 22 | 27 22 20 2b 20 65 6c 65 |tern = "|'" + ele|
|00002d90| 6d 65 6e 74 20 28 33 2c | 20 61 72 67 76 29 20 2b |ment (3,| argv) +|
|00002da0| 20 22 27 22 3b 0a 20 20 | 20 20 65 78 65 63 20 28 | "'";. | exec (|
|00002db0| 68 6f 6d 65 20 2b 20 22 | 2f 61 66 69 6f 73 63 72 |home + "|/afioscr|
|00002dc0| 69 70 74 73 2f 6c 69 73 | 74 62 61 63 6b 75 70 22 |ipts/lis|tbackup"|
|00002dd0| 2c 20 65 6c 65 6d 65 6e | 74 20 28 32 2c 20 61 72 |, elemen|t (2, ar|
|00002de0| 67 76 29 2c 20 70 61 74 | 74 65 72 6e 29 3b 0a 7d |gv), pat|tern);.}|
|00002df0| 0a 0a 76 6f 69 64 20 72 | 65 73 74 6f 72 65 20 28 |..void r|estore (|
|00002e00| 69 6e 74 20 61 72 67 63 | 2c 20 6c 69 73 74 20 61 |int argc|, list a|
|00002e10| 72 67 76 29 0a 7b 0a 20 | 20 20 20 73 74 72 69 6e |rgv).{. | strin|
|00002e20| 67 0a 20 20 20 20 20 20 | 20 20 70 61 74 74 65 72 |g. | patter|
|00002e30| 6e 3b 0a 09 0a 20 20 20 | 20 6e 65 65 64 61 72 67 |n;... | needarg|
|00002e40| 73 20 28 61 72 67 63 2c | 20 34 2c 20 34 29 3b 0a |s (argc,| 4, 4);.|
|00002e50| 20 20 20 20 70 61 74 74 | 65 72 6e 20 3d 20 22 27 | patt|ern = "'|
|00002e60| 22 20 2b 20 65 6c 65 6d | 65 6e 74 20 28 33 2c 20 |" + elem|ent (3, |
|00002e70| 61 72 67 76 29 20 2b 20 | 22 27 22 3b 0a 20 20 20 |argv) + |"'";. |
|00002e80| 20 65 78 65 63 20 28 68 | 6f 6d 65 20 2b 20 22 2f | exec (h|ome + "/|
|00002e90| 61 66 69 6f 73 63 72 69 | 70 74 73 2f 72 65 73 74 |afioscri|pts/rest|
|00002ea0| 6f 72 65 62 61 63 6b 75 | 70 22 2c 20 65 6c 65 6d |orebacku|p", elem|
|00002eb0| 65 6e 74 20 28 32 2c 20 | 61 72 67 76 29 2c 20 70 |ent (2, |argv), p|
|00002ec0| 61 74 74 65 72 6e 29 3b | 0a 7d 0a 0a 76 6f 69 64 |attern);|.}..void|
|00002ed0| 20 6d 61 6b 65 64 69 73 | 74 20 28 29 0a 7b 0a 20 | makedis|t ().{. |
|00002ee0| 20 20 20 6c 69 73 74 0a | 20 20 20 20 20 20 20 20 | list.| |
|00002ef0| 66 69 6c 65 73 3b 0a 20 | 20 20 20 69 6e 74 0a 20 |files;. | int. |
|00002f00| 20 20 20 20 20 20 20 69 | 3b 0a 09 0a 20 20 20 20 | i|;... |
|00002f10| 66 69 6c 65 73 20 3d 20 | 28 6c 69 73 74 29 20 22 |files = |(list) "|
|00002f20| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 62 69 6e 2f 69 |/usr/loc|al/bin/i|
|00002f30| 63 6d 61 6b 65 22 20 2b | 0a 20 20 20 20 20 20 20 |cmake" +|. |
|00002f40| 20 20 20 20 20 28 6c 69 | 73 74 29 20 22 2f 75 73 | (li|st) "/us|
|00002f50| 72 2f 6c 6f 63 61 6c 2f | 62 69 6e 2f 69 63 6d 2d |r/local/|bin/icm-|
|00002f60| 70 70 22 20 2b 0a 20 20 | 20 20 20 20 20 20 20 20 |pp" +. | |
|00002f70| 20 20 28 6c 69 73 74 29 | 20 22 2f 75 73 72 2f 6c | (list)| "/usr/l|
|00002f80| 6f 63 61 6c 2f 62 69 6e | 2f 69 63 6d 2d 63 6f 6d |ocal/bin|/icm-com|
|00002f90| 70 22 20 2b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |p" +. | |
|00002fa0| 20 28 6c 69 73 74 29 20 | 22 2f 75 73 72 2f 6c 6f | (list) |"/usr/lo|
|00002fb0| 63 61 6c 2f 62 69 6e 2f | 69 63 6d 2d 65 78 65 63 |cal/bin/|icm-exec|
|00002fc0| 22 20 2b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |" +. | |
|00002fd0| 28 6c 69 73 74 29 20 22 | 2f 75 73 72 2f 6c 6f 63 |(list) "|/usr/loc|
|00002fe0| 61 6c 2f 62 69 6e 2f 69 | 63 6d 75 6d 22 20 2b 0a |al/bin/i|cmum" +.|
|00002ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 6c 69 73 | | (lis|
|00003000| 74 29 20 22 2f 75 73 72 | 2f 6c 6f 63 61 6c 2f 62 |t) "/usr|/local/b|
|00003010| 69 6e 2f 61 66 69 6f 22 | 3b 0a 0a 20 20 20 20 66 |in/afio"|;.. f|
|00003020| 6f 72 20 28 69 20 3d 20 | 30 3b 20 69 20 3c 20 73 |or (i = |0; i < s|
|00003030| 69 7a 65 6f 66 20 28 66 | 69 6c 65 73 29 3b 20 69 |izeof (f|iles); i|
|00003040| 2b 2b 29 0a 20 20 20 20 | 20 20 20 20 69 66 20 28 |++). | if (|
|00003050| 63 68 61 6e 67 65 5f 70 | 61 74 68 20 28 65 6c 65 |change_p|ath (ele|
|00003060| 6d 65 6e 74 20 28 69 2c | 20 66 69 6c 65 73 29 2c |ment (i,| files),|
|00003070| 20 22 61 75 78 62 69 6e | 22 29 20 6f 6c 64 65 72 | "auxbin|") older|
|00003080| 20 0a 09 20 20 20 20 65 | 6c 65 6d 65 6e 74 20 28 | .. e|lement (|
|00003090| 69 2c 20 66 69 6c 65 73 | 29 0a 09 20 20 20 29 0a |i, files|).. ).|
|000030a0| 09 20 20 20 20 65 78 65 | 63 20 28 22 63 70 22 2c |. exe|c ("cp",|
|000030b0| 20 65 6c 65 6d 65 6e 74 | 20 28 69 2c 20 66 69 6c | element| (i, fil|
|000030c0| 65 73 29 2c 20 22 61 75 | 78 62 69 6e 22 29 3b 0a |es), "au|xbin");.|
|000030d0| 09 20 20 20 20 0a 20 20 | 20 20 69 66 20 28 22 61 |. . | if ("a|
|000030e0| 75 78 73 63 72 69 70 74 | 73 2f 6e 65 74 62 61 63 |uxscript|s/netbac|
|000030f0| 6b 75 70 22 20 6f 6c 64 | 65 72 20 22 2f 75 73 72 |kup" old|er "/usr|
|00003100| 2f 6c 6f 63 61 6c 2f 62 | 69 6e 2f 6e 65 74 62 61 |/local/b|in/netba|
|00003110| 63 6b 75 70 22 29 0a 20 | 20 20 20 20 20 20 20 65 |ckup"). | e|
|00003120| 78 65 63 20 28 22 63 70 | 22 2c 20 22 2f 75 73 72 |xec ("cp|", "/usr|
|00003130| 2f 6c 6f 63 61 6c 2f 62 | 69 6e 2f 6e 65 74 62 61 |/local/b|in/netba|
|00003140| 63 6b 75 70 22 2c 20 22 | 61 75 78 73 63 72 69 70 |ckup", "|auxscrip|
|00003150| 74 73 22 29 3b 0a 09 0a | 20 20 20 20 65 78 65 63 |ts");...| exec|
|00003160| 20 28 22 66 69 6e 64 22 | 2c 20 22 2e 22 2c 20 22 | ("find"|, ".", "|
|00003170| 2d 6e 61 6d 65 20 5c 5c | 5c 2a 2e 62 69 6d 22 2c |-name \\|\*.bim",|
|00003180| 20 22 2d 65 78 65 63 20 | 72 6d 20 7b 7d 20 5c 5c | "-exec |rm {} \\|
|00003190| 3b 22 29 3b 0a 20 20 20 | 20 0a 20 20 20 20 65 78 |;");. | . ex|
|000031a0| 65 63 20 28 22 6d 6b 64 | 69 72 22 2c 20 22 2d 70 |ec ("mkd|ir", "-p|
|000031b0| 22 2c 20 22 2f 74 6d 70 | 2f 62 61 63 6b 75 70 2f |", "/tmp|/backup/|
|000031c0| 6c 69 73 74 73 22 2c 20 | 22 2f 74 6d 70 2f 62 61 |lists", |"/tmp/ba|
|000031d0| 63 6b 75 70 2f 76 6f 6c | 75 6d 65 73 22 2c 0a 20 |ckup/vol|umes",. |
|000031e0| 20 20 20 20 20 20 20 20 | 20 20 22 2f 74 6d 70 2f | | "/tmp/|
|000031f0| 62 61 63 6b 75 70 2f 73 | 74 61 6d 70 73 22 29 3b |backup/s|tamps");|
|00003200| 0a 20 20 20 20 65 78 65 | 63 20 28 22 6d 76 22 2c |. exe|c ("mv",|
|00003210| 20 22 76 6f 6c 75 6d 65 | 73 2f 2a 22 2c 20 22 2f | "volume|s/*", "/|
|00003220| 74 6d 70 2f 62 61 63 6b | 75 70 2f 76 6f 6c 75 6d |tmp/back|up/volum|
|00003230| 65 73 22 29 3b 0a 20 20 | 20 20 65 78 65 63 20 28 |es");. | exec (|
|00003240| 22 6d 76 22 2c 20 22 6c | 69 73 74 73 2f 2a 22 2c |"mv", "l|ists/*",|
|00003250| 20 20 20 22 2f 74 6d 70 | 2f 62 61 63 6b 75 70 2f | "/tmp|/backup/|
|00003260| 6c 69 73 74 73 22 29 3b | 0a 20 20 20 20 65 78 65 |lists");|. exe|
|00003270| 63 20 28 22 6d 76 22 2c | 20 22 73 74 61 6d 70 73 |c ("mv",| "stamps|
|00003280| 2f 2a 22 2c 20 20 22 2f | 74 6d 70 2f 62 61 63 6b |/*", "/|tmp/back|
|00003290| 75 70 2f 73 74 61 6d 70 | 73 22 29 3b 0a 20 20 20 |up/stamp|s");. |
|000032a0| 20 0a 20 20 20 20 63 68 | 64 69 72 20 28 22 2e 2e | . ch|dir ("..|
|000032b0| 22 29 3b 0a 20 20 20 20 | 65 78 65 63 20 28 22 74 |");. |exec ("t|
|000032c0| 61 72 22 2c 20 22 63 76 | 7a 66 22 2c 20 22 62 61 |ar", "cv|zf", "ba|
|000032d0| 63 6b 75 70 2d 22 20 56 | 45 52 20 22 2e 74 61 72 |ckup-" V|ER ".tar|
|000032e0| 2e 67 7a 22 2c 20 22 62 | 61 63 6b 75 70 22 29 3b |.gz", "b|ackup");|
|000032f0| 0a 20 20 20 20 0a 20 20 | 20 20 63 68 64 69 72 20 |. . | chdir |
|00003300| 28 22 62 61 63 6b 75 70 | 22 29 3b 0a 20 20 20 20 |("backup|");. |
|00003310| 65 78 65 63 20 28 22 6d | 76 22 2c 20 22 2f 74 6d |exec ("m|v", "/tm|
|00003320| 70 2f 62 61 63 6b 75 70 | 2f 73 74 61 6d 70 73 2f |p/backup|/stamps/|
|00003330| 2a 22 2c 20 20 22 73 74 | 61 6d 70 73 22 29 3b 0a |*", "st|amps");.|
|00003340| 20 20 20 20 65 78 65 63 | 20 28 22 6d 76 22 2c 20 | exec| ("mv", |
|00003350| 22 2f 74 6d 70 2f 62 61 | 63 6b 75 70 2f 6c 69 73 |"/tmp/ba|ckup/lis|
|00003360| 74 73 2f 2a 22 2c 20 20 | 20 22 6c 69 73 74 73 22 |ts/*", | "lists"|
|00003370| 29 3b 0a 20 20 20 20 65 | 78 65 63 20 28 22 6d 76 |);. e|xec ("mv|
|00003380| 22 2c 20 22 2f 74 6d 70 | 2f 62 61 63 6b 75 70 2f |", "/tmp|/backup/|
|00003390| 76 6f 6c 75 6d 65 73 2f | 2a 22 2c 20 22 76 6f 6c |volumes/|*", "vol|
|000033a0| 75 6d 65 73 22 29 3b 0a | 20 20 20 20 65 78 65 63 |umes");.| exec|
|000033b0| 20 28 22 72 6d 22 2c 20 | 22 2d 72 22 2c 20 22 2f | ("rm", |"-r", "/|
|000033c0| 74 6d 70 2f 62 61 63 6b | 75 70 20 61 75 78 62 69 |tmp/back|up auxbi|
|000033d0| 6e 2f 2a 20 61 75 78 73 | 63 72 69 70 74 73 2f 2a |n/* auxs|cripts/*|
|000033e0| 22 29 3b 0a 7d 0a 0a 76 | 6f 69 64 20 6d 61 69 6e |");.}..v|oid main|
|000033f0| 20 28 69 6e 74 20 61 72 | 67 63 2c 20 6c 69 73 74 | (int ar|gc, list|
|00003400| 20 61 72 67 76 2c 20 6c | 69 73 74 20 65 6e 76 70 | argv, l|ist envp|
|00003410| 29 0a 7b 0a 20 20 20 20 | 73 74 72 69 6e 67 0a 20 |).{. |string. |
|00003420| 20 20 20 20 20 20 20 73 | 65 6c 65 63 74 6f 72 3b | s|elector;|
|00003430| 0a 0a 20 20 20 20 65 63 | 68 6f 20 28 30 29 3b 0a |.. ec|ho (0);.|
|00003440| 0a 20 20 20 20 68 6f 6d | 65 65 6e 76 20 28 65 6e |. hom|eenv (en|
|00003450| 76 70 29 3b 0a 09 0a 20 | 20 20 20 73 65 6c 65 63 |vp);... | selec|
|00003460| 74 6f 72 20 3d 20 65 6c | 65 6d 65 6e 74 20 28 31 |tor = el|ement (1|
|00003470| 2c 20 61 72 67 76 29 3b | 0a 20 20 20 20 0a 20 20 |, argv);|. . |
|00003480| 20 20 69 66 20 28 73 65 | 6c 65 63 74 6f 72 20 3d | if (se|lector =|
|00003490| 3d 20 22 2d 66 75 6c 6c | 22 29 0a 20 20 20 20 20 |= "-full|"). |
|000034a0| 20 20 20 66 75 6c 6c 20 | 28 61 72 67 63 2c 20 61 | full |(argc, a|
|000034b0| 72 67 76 29 3b 0a 20 20 | 20 20 65 6c 73 65 20 69 |rgv);. | else i|
|000034c0| 66 20 28 73 65 6c 65 63 | 74 6f 72 20 3d 3d 20 22 |f (selec|tor == "|
|000034d0| 2d 69 6e 63 72 65 6d 65 | 6e 74 61 6c 22 29 0a 20 |-increme|ntal"). |
|000034e0| 20 20 20 20 20 20 20 69 | 6e 63 72 65 6d 65 6e 74 | i|ncrement|
|000034f0| 61 6c 20 28 61 72 67 63 | 2c 20 61 72 67 76 29 3b |al (argc|, argv);|
|00003500| 0a 20 20 20 20 65 6c 73 | 65 20 69 66 20 28 73 65 |. els|e if (se|
|00003510| 6c 65 63 74 6f 72 20 3d | 3d 20 22 2d 77 68 69 63 |lector =|= "-whic|
|00003520| 68 22 29 0a 20 20 20 20 | 20 20 20 20 77 68 69 63 |h"). | whic|
|00003530| 68 20 28 61 72 67 63 2c | 20 61 72 67 76 29 3b 0a |h (argc,| argv);.|
|00003540| 20 20 20 20 65 6c 73 65 | 20 69 66 20 28 73 65 6c | else| if (sel|
|00003550| 65 63 74 6f 72 20 3d 3d | 20 22 2d 62 61 63 6b 75 |ector ==| "-backu|
|00003560| 70 73 22 29 0a 20 20 20 | 20 20 20 20 20 62 61 63 |ps"). | bac|
|00003570| 6b 75 70 73 20 28 61 72 | 67 63 2c 20 61 72 67 76 |kups (ar|gc, argv|
|00003580| 29 3b 0a 20 20 20 20 65 | 6c 73 65 20 69 66 20 28 |);. e|lse if (|
|00003590| 73 65 6c 65 63 74 6f 72 | 20 3d 3d 20 22 2d 76 65 |selector| == "-ve|
|000035a0| 72 62 6f 73 65 22 29 0a | 20 20 20 20 20 20 20 20 |rbose").| |
|000035b0| 76 65 72 62 6f 73 65 20 | 28 61 72 67 63 2c 20 61 |verbose |(argc, a|
|000035c0| 72 67 76 29 3b 0a 20 20 | 20 20 65 6c 73 65 20 69 |rgv);. | else i|
|000035d0| 66 20 28 73 65 6c 65 63 | 74 6f 72 20 3d 3d 20 22 |f (selec|tor == "|
|000035e0| 2d 72 65 73 74 6f 72 65 | 22 29 0a 20 20 20 20 20 |-restore|"). |
|000035f0| 20 20 20 72 65 73 74 6f | 72 65 20 28 61 72 67 63 | resto|re (argc|
|00003600| 2c 20 61 72 67 76 29 3b | 0a 20 20 20 20 65 6c 73 |, argv);|. els|
|00003610| 65 20 69 66 20 28 73 65 | 6c 65 63 74 6f 72 20 3d |e if (se|lector =|
|00003620| 3d 20 22 2d 6d 61 6b 65 | 64 69 73 74 22 29 0a 20 |= "-make|dist"). |
|00003630| 20 20 20 20 20 20 20 6d | 61 6b 65 64 69 73 74 20 | m|akedist |
|00003640| 28 29 3b 0a 20 20 20 20 | 65 6c 73 65 0a 20 20 20 |();. |else. |
|00003650| 20 20 20 20 20 75 73 61 | 67 65 20 28 29 3b 0a 09 | usa|ge ();..|
|00003660| 0a 20 20 20 20 65 78 69 | 74 20 28 30 29 3b 0a 7d |. exi|t (0);.}|
|00003670| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003800| 62 61 63 6b 75 70 2f 49 | 4e 53 54 41 4c 4c 2e 44 |backup/I|NSTALL.D|
|00003810| 4f 43 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |OC......|........|
|00003820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003860| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 20 20 |....1006|44 . |
|00003870| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00003880| 20 20 31 31 34 37 34 20 | 20 35 35 37 37 30 30 30 | 11474 | 5577000|
|00003890| 31 30 36 20 20 31 32 30 | 36 36 00 20 30 00 00 00 |106 120|66. 0...|
|000038a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003900| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00003910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003920| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 51 75 69 63 | | Quic|
|00003a10| 6b 20 69 6e 73 74 61 6c | 6c 61 74 69 6f 6e 20 67 |k instal|lation g|
|00003a20| 75 69 64 65 20 66 6f 72 | 20 74 68 65 20 62 61 63 |uide for| the bac|
|00003a30| 6b 75 70 20 73 63 72 69 | 70 74 73 0a 09 20 20 20 |kup scri|pts.. |
|00003a40| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00003a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a70| 0a 0a 28 31 29 20 53 65 | 6c 65 63 74 20 61 20 6e |..(1) Se|lect a n|
|00003a80| 61 6d 65 20 66 6f 72 20 | 74 68 65 20 62 61 63 6b |ame for |the back|
|00003a90| 75 70 20 64 69 72 65 63 | 74 6f 72 79 2e 20 2f 75 |up direc|tory. /u|
|00003aa0| 73 72 2f 6c 6f 63 61 6c | 2f 65 74 63 20 6d 61 79 |sr/local|/etc may|
|00003ab0| 20 62 65 20 61 20 67 6f | 6f 64 0a 63 68 6f 69 63 | be a go|od.choic|
|00003ac0| 65 2e 20 55 6e 70 61 63 | 6b 20 74 68 65 20 61 72 |e. Unpac|k the ar|
|00003ad0| 63 68 69 76 65 20 75 6e | 64 65 72 20 74 68 69 73 |chive un|der this|
|00003ae0| 20 64 69 72 65 63 74 6f | 72 79 3b 20 74 68 69 73 | directo|ry; this|
|00003af0| 20 77 69 6c 6c 20 79 69 | 65 6c 64 20 61 0a 73 75 | will yi|eld a.su|
|00003b00| 62 64 69 72 65 63 74 6f | 72 79 20 62 61 63 6b 75 |bdirecto|ry backu|
|00003b10| 70 2f 20 75 6e 64 65 72 | 20 77 68 69 63 68 20 61 |p/ under| which a|
|00003b20| 6c 6c 20 73 74 75 66 66 | 20 69 73 20 6c 6f 63 61 |ll stuff| is loca|
|00003b30| 74 65 64 2e 20 54 68 65 | 20 62 61 63 6b 75 70 2f |ted. The| backup/|
|00003b40| 0a 73 75 62 64 69 72 65 | 63 74 6f 72 79 20 73 68 |.subdire|ctory sh|
|00003b50| 6f 75 6c 64 20 62 65 20 | 72 65 61 64 61 62 6c 65 |ould be |readable|
|00003b60| 20 62 79 20 72 6f 6f 74 | 20 6f 6e 6c 79 20 28 74 | by root| only (t|
|00003b70| 68 69 73 20 69 73 20 74 | 68 65 20 64 65 66 61 75 |his is t|he defau|
|00003b80| 6c 74 20 77 68 65 6e 0a | 65 78 74 72 61 63 74 69 |lt when.|extracti|
|00003b90| 6e 67 29 2e 20 54 68 65 | 6e 20 63 64 20 74 6f 20 |ng). The|n cd to |
|00003ba0| 62 61 63 6b 75 70 2e 0a | 0a 28 32 29 20 49 66 20 |backup..|.(2) If |
|00003bb0| 79 6f 75 20 64 6f 6e 27 | 74 20 68 61 76 65 20 74 |you don'|t have t|
|00003bc0| 68 65 20 61 72 63 68 69 | 76 65 72 20 70 72 6f 67 |he archi|ver prog|
|00003bd0| 72 61 6d 20 61 66 69 6f | 2c 20 63 6f 70 79 20 69 |ram afio|, copy i|
|00003be0| 74 20 66 72 6f 6d 20 61 | 75 78 62 69 6e 2f 20 74 |t from a|uxbin/ t|
|00003bf0| 6f 20 61 0a 64 69 72 65 | 63 74 6f 72 79 20 69 6e |o a.dire|ctory in|
|00003c00| 20 79 6f 75 72 20 70 61 | 74 68 3a 0a 0a 20 20 20 | your pa|th:.. |
|00003c10| 20 20 20 20 20 63 70 20 | 61 75 78 62 69 6e 2f 61 | cp |auxbin/a|
|00003c20| 66 69 6f 20 2f 75 73 72 | 2f 6c 6f 63 61 6c 2f 62 |fio /usr|/local/b|
|00003c30| 69 6e 0a 09 0a 41 6c 74 | 65 72 6e 61 74 69 76 65 |in...Alt|ernative|
|00003c40| 6c 79 2c 20 67 65 74 20 | 61 66 69 6f 20 66 72 6f |ly, get |afio fro|
|00003c50| 6d 20 74 73 78 2d 31 31 | 2e 6d 69 74 2e 65 64 75 |m tsx-11|.mit.edu|
|00003c60| 20 6f 72 20 66 72 6f 6d | 20 73 75 6e 73 69 74 65 | or from| sunsite|
|00003c70| 2e 75 6e 63 2e 65 64 75 | 20 61 6e 64 0a 63 6f 6d |.unc.edu| and.com|
|00003c80| 70 69 6c 65 20 69 74 20 | 79 6f 75 72 73 65 6c 66 |pile it |yourself|
|00003c90| 2e 20 54 68 65 20 70 72 | 65 63 6f 6d 70 69 6c 65 |. The pr|ecompile|
|00003ca0| 64 20 76 65 72 73 69 6f | 6e 20 72 75 6e 73 2c 20 |d versio|n runs, |
|00003cb0| 6f 66 20 63 6f 75 72 73 | 65 2c 20 6f 6e 6c 79 20 |of cours|e, only |
|00003cc0| 75 6e 64 65 72 0a 4c 69 | 6e 75 78 2e 0a 09 0a 28 |under.Li|nux....(|
|00003cd0| 33 29 20 49 66 20 79 6f | 75 20 64 6f 6e 27 74 20 |3) If yo|u don't |
|00003ce0| 68 61 76 65 20 69 63 6d | 61 6b 65 2c 20 63 6f 70 |have icm|ake, cop|
|00003cf0| 79 20 69 74 20 66 72 6f | 6d 20 61 75 78 62 69 6e |y it fro|m auxbin|
|00003d00| 2f 20 74 6f 20 61 20 64 | 69 72 65 63 74 6f 72 79 |/ to a d|irectory|
|00003d10| 20 69 6e 20 79 6f 75 72 | 0a 70 61 74 68 3a 0a 0a | in your|.path:..|
|00003d20| 20 20 20 20 20 20 20 20 | 63 70 20 61 75 78 62 69 | |cp auxbi|
|00003d30| 6e 2f 69 63 6d 2a 20 2f | 75 73 72 2f 6c 6f 63 61 |n/icm* /|usr/loca|
|00003d40| 6c 2f 62 69 6e 0a 09 0a | 41 6c 74 65 72 6e 61 74 |l/bin...|Alternat|
|00003d50| 69 76 65 6c 79 2c 20 67 | 65 74 20 69 63 6d 61 6b |ively, g|et icmak|
|00003d60| 65 20 66 72 6f 6d 20 62 | 65 61 74 72 69 78 2e 69 |e from b|eatrix.i|
|00003d70| 63 63 65 2e 72 75 67 2e | 6e 6c 2c 20 74 73 78 2d |cce.rug.|nl, tsx-|
|00003d80| 31 31 2e 6d 69 74 2e 65 | 64 75 2c 20 6f 72 20 66 |11.mit.e|du, or f|
|00003d90| 72 6f 6d 0a 73 75 6e 73 | 69 74 65 2e 75 6e 63 2e |rom.suns|ite.unc.|
|00003da0| 65 64 75 09 61 6e 64 20 | 63 6f 6d 70 69 6c 65 20 |edu.and |compile |
|00003db0| 69 74 20 79 6f 75 72 73 | 65 6c 66 2e 20 41 67 61 |it yours|elf. Aga|
|00003dc0| 69 6e 2c 20 74 68 65 20 | 70 72 65 63 6f 6d 70 69 |in, the |precompi|
|00003dd0| 6c 65 64 20 76 65 72 73 | 69 6f 6e 73 20 72 75 6e |led vers|ions run|
|00003de0| 0a 6f 6e 6c 79 20 75 6e | 64 65 72 20 4c 69 6e 75 |.only un|der Linu|
|00003df0| 78 2e 0a 0a 28 34 29 20 | 49 66 20 79 6f 75 20 77 |x...(4) |If you w|
|00003e00| 61 6e 74 20 74 6f 20 73 | 61 76 65 20 64 69 73 6b |ant to s|ave disk|
|00003e10| 73 70 61 63 65 2c 20 64 | 65 6c 65 74 65 20 61 75 |space, d|elete au|
|00003e20| 78 62 69 6e 2f 20 61 6e | 64 20 69 74 73 20 63 6f |xbin/ an|d its co|
|00003e30| 6e 74 65 6e 74 73 3a 0a | 0a 20 20 20 20 20 20 20 |ntents:.|. |
|00003e40| 20 72 6d 20 2d 72 20 61 | 75 78 62 69 6e 0a 0a 28 | rm -r a|uxbin..(|
|00003e50| 35 29 20 49 66 20 79 6f | 75 20 61 72 65 20 6e 6f |5) If yo|u are no|
|00003e60| 74 20 75 73 69 6e 67 20 | 2f 75 73 72 2f 6c 6f 63 |t using |/usr/loc|
|00003e70| 61 6c 2f 65 74 63 2f 62 | 61 63 6b 75 70 20 61 73 |al/etc/b|ackup as|
|00003e80| 20 74 68 65 20 74 6f 70 | 2d 6c 65 76 65 6c 20 64 | the top|-level d|
|00003e90| 69 72 65 63 74 6f 72 79 | 20 6f 66 0a 74 68 65 20 |irectory| of.the |
|00003ea0| 62 61 63 6b 75 70 20 73 | 63 72 69 70 74 73 2c 20 |backup s|cripts, |
|00003eb0| 65 64 69 74 20 74 68 65 | 20 66 69 6c 65 20 62 61 |edit the| file ba|
|00003ec0| 63 6b 75 70 20 61 6e 64 | 20 63 68 61 6e 67 65 20 |ckup and| change |
|00003ed0| 74 68 65 20 6c 69 6e 65 | 0a 0a 20 20 20 20 20 20 |the line|.. |
|00003ee0| 20 20 23 64 65 66 69 6e | 65 20 44 45 46 41 55 4c | #defin|e DEFAUL|
|00003ef0| 54 5f 48 4f 4d 45 20 22 | 2f 75 73 72 2f 6c 6f 63 |T_HOME "|/usr/loc|
|00003f00| 61 6c 2f 65 74 63 2f 62 | 61 63 6b 75 70 22 0a 0a |al/etc/b|ackup"..|
|00003f10| 74 6f 20 72 65 66 6c 65 | 63 74 20 74 68 65 20 74 |to refle|ct the t|
|00003f20| 6f 70 2d 6c 65 76 65 6c | 20 64 69 72 65 63 74 6f |op-level| directo|
|00003f30| 72 79 2e 20 45 2e 67 2c | 20 69 66 20 79 6f 75 20 |ry. E.g,| if you |
|00003f40| 75 73 65 20 2f 73 62 69 | 6e 2f 62 61 63 6b 75 70 |use /sbi|n/backup|
|00003f50| 20 66 6f 72 20 79 6f 75 | 72 0a 74 6f 70 2d 6c 65 | for you|r.top-le|
|00003f60| 76 65 6c 20 64 69 72 65 | 63 74 6f 72 79 2c 20 79 |vel dire|ctory, y|
|00003f70| 6f 75 27 64 20 77 72 69 | 74 65 20 22 2f 73 62 69 |ou'd wri|te "/sbi|
|00003f80| 6e 2f 62 61 63 6b 75 70 | 22 20 66 6f 72 20 74 68 |n/backup|" for th|
|00003f90| 65 20 73 65 74 74 69 6e | 67 20 6f 66 20 74 68 65 |e settin|g of the|
|00003fa0| 0a 23 64 65 66 69 6e 65 | 20 44 45 46 41 55 4c 54 |.#define| DEFAULT|
|00003fb0| 5f 48 4f 4d 45 2e 0a 0a | 28 36 29 20 49 66 20 79 |_HOME...|(6) If y|
|00003fc0| 6f 75 72 20 62 61 63 6b | 75 70 20 6d 65 64 69 75 |our back|up mediu|
|00003fd0| 6d 20 69 73 20 6f 66 20 | 6c 69 6d 69 74 65 64 20 |m is of |limited |
|00003fe0| 73 69 7a 65 20 28 65 2e | 67 2e 2c 20 66 6c 6f 70 |size (e.|g., flop|
|00003ff0| 70 69 65 73 29 2c 20 65 | 64 69 74 0a 61 66 69 6f |pies), e|dit.afio|
|00004000| 73 63 72 69 70 74 73 2f | 73 69 7a 65 20 61 6e 64 |scripts/|size and|
|00004010| 20 65 6e 74 65 72 20 74 | 68 65 20 73 69 7a 65 20 | enter t|he size |
|00004020| 69 6e 20 74 68 61 74 20 | 66 69 6c 65 2e 20 54 68 |in that |file. Th|
|00004030| 65 20 66 69 6c 65 20 61 | 66 69 6f 73 63 72 69 70 |e file a|fioscrip|
|00004040| 74 73 2f 73 69 7a 65 0a | 69 73 20 62 79 20 64 65 |ts/size.|is by de|
|00004050| 66 61 75 6c 74 20 6e 6f | 74 20 70 72 65 73 65 6e |fault no|t presen|
|00004060| 74 2e 0a 0a 50 75 74 20 | 6a 75 73 74 20 6f 6e 65 |t...Put |just one|
|00004070| 20 6c 69 6e 65 20 69 6e | 20 61 66 69 6f 73 63 72 | line in| afioscr|
|00004080| 69 70 74 73 2f 73 69 7a | 65 2e 20 54 68 65 20 6c |ipts/siz|e. The l|
|00004090| 69 6e 65 20 6d 75 73 74 | 20 63 6f 6e 73 69 73 74 |ine must| consist|
|000040a0| 20 6f 66 20 61 20 6e 75 | 6d 62 65 72 20 61 6e 64 | of a nu|mber and|
|000040b0| 0a 61 20 70 6f 73 74 66 | 69 78 2c 20 77 68 65 72 |.a postf|ix, wher|
|000040c0| 65 20 74 68 65 20 70 6f | 73 74 66 69 78 20 64 65 |e the po|stfix de|
|000040d0| 66 69 6e 65 73 20 74 68 | 65 20 75 6e 69 74 20 73 |fines th|e unit s|
|000040e0| 69 7a 65 2e 0a 0a 50 6f | 73 74 66 69 78 20 62 20 |ize...Po|stfix b |
|000040f0| 64 65 66 69 6e 65 73 20 | 74 69 6d 65 73 20 35 31 |defines |times 51|
|00004100| 32 20 62 79 74 65 73 20 | 28 6e 75 6d 62 65 72 20 |2 bytes |(number |
|00004110| 6f 66 20 35 31 32 20 62 | 79 74 65 20 62 6c 6f 63 |of 512 b|yte bloc|
|00004120| 6b 73 29 2c 20 70 6f 73 | 74 66 69 78 20 6b 0a 64 |ks), pos|tfix k.d|
|00004130| 65 66 69 6e 65 73 20 74 | 69 6d 65 73 20 31 30 32 |efines t|imes 102|
|00004140| 34 20 62 79 74 65 73 20 | 28 6e 75 6d 62 65 72 20 |4 bytes |(number |
|00004150| 6f 66 20 31 4b 62 20 75 | 6e 69 74 73 29 2c 20 70 |of 1Kb u|nits), p|
|00004160| 6f 73 74 66 69 78 20 6d | 20 64 65 66 69 6e 65 73 |ostfix m| defines|
|00004170| 20 74 69 6d 65 73 0a 31 | 30 34 38 35 37 36 20 62 | times.1|048576 b|
|00004180| 79 74 65 73 20 28 6e 75 | 6d 62 65 72 20 6f 66 20 |ytes (nu|mber of |
|00004190| 31 4d 65 67 20 75 6e 69 | 74 73 29 2e 20 45 2e 67 |1Meg uni|ts). E.g|
|000041a0| 2e 2c 20 66 6f 72 20 61 | 20 74 61 70 65 20 64 72 |., for a| tape dr|
|000041b0| 69 76 65 20 77 69 74 68 | 20 32 30 4d 65 67 0a 74 |ive with| 20Meg.t|
|000041c0| 61 70 65 73 2c 20 75 73 | 65 0a 20 20 20 20 20 20 |apes, us|e. |
|000041d0| 20 20 0a 20 20 20 20 20 | 20 20 20 32 30 6d 0a 09 | . | 20m..|
|000041e0| 0a 46 6f 72 20 61 20 31 | 2e 34 34 4d 65 67 20 66 |.For a 1|.44Meg f|
|000041f0| 6c 6f 70 70 79 20 75 73 | 65 0a 0a 20 20 20 20 20 |loppy us|e.. |
|00004200| 20 20 20 31 34 34 30 6b | 0a 0a 28 37 29 20 54 68 | 1440k|..(7) Th|
|00004210| 65 20 62 61 63 6b 75 70 | 20 73 63 72 69 70 74 73 |e backup| scripts|
|00004220| 20 73 63 61 6e 20 6f 6e | 6c 79 20 74 68 65 20 66 | scan on|ly the f|
|00004230| 69 6c 65 73 79 73 74 65 | 6d 20 6f 66 20 74 68 65 |ilesyste|m of the|
|00004240| 20 73 74 61 72 74 69 6e | 67 20 64 69 72 65 63 74 | startin|g direct|
|00004250| 6f 72 79 20 61 6e 64 0a | 64 6f 20 6e 6f 74 20 64 |ory and.|do not d|
|00004260| 65 73 63 65 6e 64 20 74 | 6f 20 6f 74 68 65 72 20 |escend t|o other |
|00004270| 66 69 6c 65 73 79 73 74 | 65 6d 73 2e 20 49 66 20 |filesyst|ems. If |
|00004280| 79 6f 75 20 77 69 73 68 | 20 74 6f 20 63 68 61 6e |you wish| to chan|
|00004290| 67 65 20 74 68 69 73 20 | 62 65 68 61 76 69 6f 72 |ge this |behavior|
|000042a0| 2c 20 65 64 69 74 0a 6d | 69 73 63 2f 62 75 69 6c |, edit.m|isc/buil|
|000042b0| 64 6c 69 73 74 20 61 6e | 64 20 63 68 61 6e 67 65 |dlist an|d change|
|000042c0| 20 74 68 65 20 6d 61 63 | 72 6f 0a 0a 09 23 64 65 | the mac|ro...#de|
|000042d0| 66 69 6e 65 20 4f 4e 45 | 44 45 56 20 31 0a 0a 74 |fine ONE|DEV 1..t|
|000042e0| 6f 0a 09 23 64 65 66 69 | 6e 65 20 4f 4e 45 44 45 |o..#defi|ne ONEDE|
|000042f0| 56 20 30 0a 0a 28 38 29 | 20 43 64 20 74 6f 20 76 |V 0..(8)| Cd to v|
|00004300| 6f 6c 75 6d 65 73 20 61 | 6e 64 20 64 65 66 69 6e |olumes a|nd defin|
|00004310| 65 20 74 68 65 20 62 61 | 63 6b 75 70 20 76 6f 6c |e the ba|ckup vol|
|00004320| 75 6d 65 73 2e 20 54 68 | 69 73 20 69 73 20 64 6f |umes. Th|is is do|
|00004330| 6e 65 20 77 69 74 68 20 | 74 77 6f 0a 66 69 6c 65 |ne with |two.file|
|00004340| 73 3a 20 56 4f 4c 55 4d | 45 2e 73 74 61 72 74 64 |s: VOLUM|E.startd|
|00004350| 69 72 20 61 6e 64 20 56 | 4f 4c 55 4d 45 2e 65 78 |ir and V|OLUME.ex|
|00004360| 63 6c 75 64 65 3b 20 77 | 68 65 72 65 20 56 4f 4c |clude; w|here VOL|
|00004370| 55 4d 45 20 69 73 20 61 | 20 6e 61 6d 65 20 79 6f |UME is a| name yo|
|00004380| 75 0a 63 68 6f 6f 73 65 | 2e 20 45 2e 67 2e 2c 20 |u.choose|. E.g., |
|00004390| 66 6f 72 20 61 20 76 6f | 6c 75 6d 65 20 60 61 6c |for a vo|lume `al|
|000043a0| 6c 27 20 79 6f 75 20 77 | 6f 75 6c 64 20 6e 65 65 |l' you w|ould nee|
|000043b0| 64 20 61 6c 6c 2e 73 74 | 61 72 74 64 69 72 20 61 |d all.st|artdir a|
|000043c0| 6e 64 20 61 6c 6c 2e 65 | 78 63 6c 75 64 65 2e 0a |nd all.e|xclude..|
|000043d0| 0a 50 75 74 20 74 68 65 | 20 73 74 61 72 74 69 6e |.Put the| startin|
|000043e0| 67 20 64 69 72 65 63 74 | 6f 72 79 20 69 6e 20 74 |g direct|ory in t|
|000043f0| 68 65 20 56 4f 4c 55 4d | 45 2e 73 74 61 72 74 64 |he VOLUM|E.startd|
|00004400| 69 72 20 66 69 6c 65 3b | 20 65 2e 67 2e 3a 0a 0a |ir file;| e.g.:..|
|00004410| 20 20 20 20 20 20 20 20 | 2f 0a 09 0a 77 6f 75 6c | |/...woul|
|00004420| 64 20 62 65 20 74 68 65 | 20 73 74 61 72 74 69 6e |d be the| startin|
|00004430| 67 20 64 69 72 65 63 74 | 6f 72 79 20 66 6f 72 20 |g direct|ory for |
|00004440| 76 6f 6c 75 6d 65 20 61 | 6c 6c 2e 0a 0a 50 75 74 |volume a|ll...Put|
|00004450| 20 74 68 65 20 64 69 72 | 65 63 74 6f 72 69 65 73 | the dir|ectories|
|00004460| 20 74 6f 20 65 78 63 6c | 75 64 65 20 69 6e 20 74 | to excl|ude in t|
|00004470| 68 65 20 56 4f 4c 55 4d | 45 2e 65 78 63 6c 75 64 |he VOLUM|E.exclud|
|00004480| 65 20 66 69 6c 65 2c 20 | 6f 6e 65 20 6f 6e 20 65 |e file, |one on e|
|00004490| 61 63 68 20 6c 69 6e 65 | 2e 0a 53 61 79 20 74 68 |ach line|..Say th|
|000044a0| 61 74 20 79 6f 75 20 77 | 69 73 68 20 74 6f 20 63 |at you w|ish to c|
|000044b0| 72 65 61 74 65 20 61 20 | 76 6f 6c 75 6d 65 20 63 |reate a |volume c|
|000044c0| 61 6c 6c 65 64 20 22 75 | 6e 69 78 22 20 66 6f 72 |alled "u|nix" for|
|000044d0| 20 79 6f 75 72 20 4c 69 | 6e 75 78 20 64 69 73 6b | your Li|nux disk|
|000044e0| 2e 20 59 6f 75 0a 74 68 | 65 6e 20 70 72 6f 62 61 |. You.th|en proba|
|000044f0| 62 6c 79 20 77 69 73 68 | 20 74 6f 20 65 78 63 6c |bly wish| to excl|
|00004500| 75 64 65 20 2f 74 6d 70 | 2e 20 20 54 68 65 20 75 |ude /tmp|. The u|
|00004510| 6e 69 78 20 76 6f 6c 75 | 6d 65 20 77 6f 75 6c 64 |nix volu|me would|
|00004520| 20 74 68 65 6e 20 62 65 | 20 64 65 66 69 6e 65 64 | then be| defined|
|00004530| 20 62 79 0a 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | by.the |followin|
|00004540| 67 20 66 69 6c 65 73 3a | 0a 0a 2d 2d 2d 2d 2d 2d |g files:|..------|
|00004550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004560| 20 75 6e 69 78 2e 73 74 | 61 72 74 64 69 72 20 73 | unix.st|artdir s|
|00004570| 74 61 72 74 73 20 68 65 | 72 65 0a 2f 0a 2d 2d 2d |tarts he|re./.---|
|00004580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004590| 2d 2d 2d 20 75 6e 69 78 | 2e 73 74 61 72 64 69 72 |--- unix|.stardir|
|000045a0| 20 65 6e 64 73 20 68 65 | 72 65 0a 0a 2d 2d 2d 2d | ends he|re..----|
|000045b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045c0| 2d 2d 20 75 6e 69 78 2e | 65 78 63 6c 75 64 65 20 |-- unix.|exclude |
|000045d0| 73 74 61 72 74 73 20 68 | 65 72 65 0a 2f 74 6d 70 |starts h|ere./tmp|
|000045e0| 0a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.-------|--------|
|000045f0| 2d 2d 2d 2d 2d 2d 2d 20 | 75 6e 69 78 2e 65 78 63 |------- |unix.exc|
|00004600| 6c 75 64 65 20 65 6e 64 | 73 20 68 65 72 65 0a 0a |lude end|s here..|
|00004610| 28 39 29 20 4d 61 6b 65 | 20 61 20 6c 69 6e 6b 20 |(9) Make| a link |
|00004620| 74 6f 20 74 68 65 20 62 | 61 63 6b 75 70 20 73 63 |to the b|ackup sc|
|00004630| 72 69 70 74 20 66 72 6f | 6d 20 61 20 64 69 72 65 |ript fro|m a dire|
|00004640| 63 74 6f 72 79 20 69 6e | 20 79 6f 75 72 20 70 61 |ctory in| your pa|
|00004650| 74 68 2c 20 69 66 20 79 | 6f 75 0a 64 6f 6e 27 74 |th, if y|ou.don't|
|00004660| 20 77 61 6e 74 20 74 6f | 20 63 64 20 74 6f 20 2f | want to| cd to /|
|00004670| 75 73 72 2f 6c 6f 63 61 | 6c 2f 65 74 63 2f 62 61 |usr/loca|l/etc/ba|
|00004680| 63 6b 75 70 20 65 61 63 | 68 20 74 69 6d 65 20 79 |ckup eac|h time y|
|00004690| 6f 75 20 72 75 6e 20 74 | 68 65 20 70 72 6f 67 72 |ou run t|he progr|
|000046a0| 61 6d 3a 0a 0a 20 20 20 | 20 20 20 20 20 6c 6e 20 |am:.. | ln |
|000046b0| 2d 73 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 65 74 |-s /usr/|local/et|
|000046c0| 63 2f 62 61 63 6b 75 70 | 2f 62 61 63 6b 75 70 20 |c/backup|/backup |
|000046d0| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 62 69 6e 2f 62 |/usr/loc|al/bin/b|
|000046e0| 61 63 6b 75 70 0a 09 0a | 41 6c 74 65 72 6e 61 74 |ackup...|Alternat|
|000046f0| 69 76 65 6c 79 2c 20 79 | 6f 75 20 63 61 6e 20 64 |ively, y|ou can d|
|00004700| 65 66 69 6e 65 20 61 6e | 20 61 6c 69 61 73 20 66 |efine an| alias f|
|00004710| 6f 72 20 74 68 65 20 72 | 6f 6f 74 20 75 73 65 72 |or the r|oot user|
|00004720| 2e 0a 0a 28 31 30 29 20 | 49 66 20 79 6f 75 20 6e |...(10) |If you n|
|00004730| 65 65 64 20 74 6f 20 6d | 61 6b 65 20 62 61 63 6b |eed to m|ake back|
|00004740| 75 70 73 20 74 6f 20 61 | 20 72 65 6d 6f 74 65 20 |ups to a| remote |
|00004750| 64 65 76 69 63 65 2c 20 | 73 75 63 68 20 61 73 20 |device, |such as |
|00004760| 61 20 74 61 70 65 20 64 | 72 69 76 65 20 6f 6e 0a |a tape d|rive on.|
|00004770| 61 20 68 6f 73 74 20 63 | 6f 6e 6e 65 63 74 65 64 |a host c|onnected|
|00004780| 20 76 69 61 20 69 6e 74 | 65 72 6e 65 74 2c 20 63 | via int|ernet, c|
|00004790| 6f 70 79 20 61 75 78 73 | 63 72 69 70 74 73 2f 6e |opy auxs|cripts/n|
|000047a0| 65 74 62 61 63 6b 75 70 | 20 74 6f 20 61 20 64 69 |etbackup| to a di|
|000047b0| 72 65 63 74 6f 72 79 20 | 69 6e 0a 79 6f 75 72 20 |rectory |in.your |
|000047c0| 70 61 74 68 3a 0a 0a 20 | 20 20 20 20 20 20 20 63 |path:.. | c|
|000047d0| 70 20 61 75 78 73 63 72 | 69 70 74 73 2f 6e 65 74 |p auxscr|ipts/net|
|000047e0| 62 61 63 6b 75 70 20 2f | 75 73 72 2f 6c 6f 63 61 |backup /|usr/loca|
|000047f0| 6c 2f 62 69 6e 0a 09 0a | 54 68 65 6e 20 65 64 69 |l/bin...|Then edi|
|00004800| 74 20 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |t /usr/l|ocal/bin|
|00004810| 2f 6e 65 74 62 61 63 6b | 75 70 20 61 6e 64 20 63 |/netback|up and c|
|00004820| 68 61 6e 67 65 20 74 68 | 65 20 23 64 65 66 69 6e |hange th|e #defin|
|00004830| 65 27 73 20 61 74 20 74 | 68 65 20 74 6f 70 20 6f |e's at t|he top o|
|00004840| 66 0a 74 68 65 20 66 69 | 6c 65 20 74 6f 20 72 65 |f.the fi|le to re|
|00004850| 66 6c 65 63 74 20 74 68 | 65 20 6e 61 6d 65 20 6f |flect th|e name o|
|00004860| 66 20 74 68 65 20 72 65 | 6d 6f 74 65 20 68 6f 73 |f the re|mote hos|
|00004870| 74 2c 20 74 68 65 20 62 | 61 63 6b 75 70 20 64 65 |t, the b|ackup de|
|00004880| 76 69 63 65 2c 20 61 6e | 64 20 74 68 65 0a 75 73 |vice, an|d the.us|
|00004890| 65 72 20 6e 61 6d 65 20 | 75 6e 64 65 72 20 77 68 |er name |under wh|
|000048a0| 69 63 68 20 74 68 65 20 | 62 61 63 6b 75 70 20 73 |ich the |backup s|
|000048b0| 68 6f 75 6c 64 20 62 65 | 20 72 75 6e 2e 20 28 53 |hould be| run. (S|
|000048c0| 65 65 20 47 45 4e 45 52 | 41 4c 2e 44 4f 43 20 66 |ee GENER|AL.DOC f|
|000048d0| 6f 72 20 61 0a 64 65 73 | 63 72 69 70 74 69 6f 6e |or a.des|cription|
|000048e0| 20 6f 66 20 74 68 65 20 | 61 63 74 69 6f 6e 73 20 | of the |actions |
|000048f0| 77 68 69 63 68 20 74 68 | 69 73 20 73 68 65 6c 6c |which th|is shell|
|00004900| 20 74 61 6b 65 73 29 2e | 0a 0a 28 31 31 29 20 49 | takes).|..(11) I|
|00004910| 66 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 73 61 |f you wa|nt to sa|
|00004920| 76 65 20 64 69 73 6b 73 | 70 61 63 65 2c 20 79 6f |ve disks|pace, yo|
|00004930| 75 20 63 61 6e 20 64 65 | 6c 65 74 65 20 61 75 78 |u can de|lete aux|
|00004940| 73 63 72 69 70 74 73 3a | 0a 0a 20 20 20 20 20 20 |scripts:|.. |
|00004950| 20 20 72 6d 20 2d 72 20 | 61 75 78 73 63 72 69 70 | rm -r |auxscrip|
|00004960| 74 73 0a 09 0a 28 31 32 | 29 20 54 68 65 20 69 6e |ts...(12|) The in|
|00004970| 63 72 65 6d 65 6e 74 61 | 6c 20 62 61 63 6b 75 70 |crementa|l backup|
|00004980| 20 70 72 6f 63 65 64 75 | 72 65 20 66 6f 6c 6c 6f | procedu|re follo|
|00004990| 77 73 20 61 20 60 68 75 | 6e 67 72 79 27 20 73 65 |ws a `hu|ngry' se|
|000049a0| 6c 65 63 74 69 6f 6e 3a | 20 61 6c 6c 0a 66 69 6c |lection:| all.fil|
|000049b0| 65 73 20 73 69 6e 63 65 | 20 74 68 65 20 6c 61 73 |es since| the las|
|000049c0| 74 20 66 75 6c 6c 20 62 | 61 63 6b 75 70 20 77 69 |t full b|ackup wi|
|000049d0| 74 68 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 63 |th a dif|ferent c|
|000049e0| 74 69 6d 65 2c 20 6d 74 | 69 6d 65 2c 20 69 6e 6f |time, mt|ime, ino|
|000049f0| 64 65 2c 20 73 69 7a 65 | 2c 0a 6f 72 20 6c 69 6e |de, size|,.or lin|
|00004a00| 6b 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 28 69 |k destin|ation (i|
|00004a10| 6e 20 74 68 65 20 63 61 | 73 65 20 6f 66 20 61 20 |n the ca|se of a |
|00004a20| 73 79 6d 62 6f 6c 69 63 | 20 6c 69 6e 6b 29 20 61 |symbolic| link) a|
|00004a30| 72 65 20 62 61 63 6b 65 | 64 20 75 70 2e 20 49 66 |re backe|d up. If|
|00004a40| 20 79 6f 75 0a 64 6f 6e | 27 74 20 77 61 6e 74 20 | you.don|'t want |
|00004a50| 74 68 65 20 68 75 6e 67 | 72 79 20 73 65 6c 65 63 |the hung|ry selec|
|00004a60| 74 69 6f 6e 2c 20 62 75 | 74 20 77 61 6e 74 20 74 |tion, bu|t want t|
|00004a70| 6f 20 63 6f 6d 70 61 72 | 65 20 69 6e 20 72 65 73 |o compar|e in res|
|00004a80| 70 65 63 74 20 74 6f 20 | 6d 74 69 6d 65 0a 6f 6e |pect to |mtime.on|
|00004a90| 6c 79 2c 20 65 64 69 74 | 20 6d 69 73 63 2f 62 75 |ly, edit| misc/bu|
|00004aa0| 69 6c 64 6c 69 73 74 20 | 61 6e 64 20 63 68 61 6e |ildlist |and chan|
|00004ab0| 67 65 20 74 68 65 20 6c | 69 6e 65 0a 0a 20 20 20 |ge the l|ine.. |
|00004ac0| 20 20 20 20 20 23 64 65 | 66 69 6e 65 20 48 55 4e | #de|fine HUN|
|00004ad0| 47 52 59 20 31 0a 09 0a | 74 6f 20 0a 20 20 20 20 |GRY 1...|to . |
|00004ae0| 20 20 20 20 0a 20 20 20 | 20 20 20 20 20 23 64 65 | . | #de|
|00004af0| 66 69 6e 65 20 48 55 4e | 47 52 59 20 30 0a 09 0a |fine HUN|GRY 0...|
|00004b00| 57 68 65 6e 20 68 75 6e | 67 72 79 20 69 73 20 6f |When hun|gry is o|
|00004b10| 66 66 2c 20 74 68 65 20 | 66 69 6c 65 73 20 74 6f |ff, the |files to|
|00004b20| 20 62 61 63 6b 75 70 20 | 6f 6e 20 61 6e 20 69 6e | backup |on an in|
|00004b30| 63 72 65 6d 65 6e 74 61 | 6c 20 62 61 63 6b 75 70 |crementa|l backup|
|00004b40| 20 61 72 65 0a 64 65 74 | 65 72 6d 69 6e 65 64 20 | are.det|ermined |
|00004b50| 62 79 20 64 61 74 65 2f | 74 69 6d 65 20 6f 6e 6c |by date/|time onl|
|00004b60| 79 2e 20 49 66 20 79 6f | 75 20 63 68 6f 6f 73 65 |y. If yo|u choose|
|00004b70| 20 74 68 65 20 6e 6f 6e | 2d 68 75 6e 67 72 79 20 | the non|-hungry |
|00004b80| 70 72 6f 63 65 64 75 72 | 65 2c 20 79 6f 75 0a 72 |procedur|e, you.r|
|00004b90| 69 73 6b 20 74 6f 20 6e | 6f 74 20 62 61 63 6b 75 |isk to n|ot backu|
|00004ba0| 70 20 66 69 6c 65 73 20 | 77 68 69 63 68 20 68 61 |p files |which ha|
|00004bb0| 76 65 20 62 65 65 6e 20 | 63 68 61 6e 67 65 64 2e |ve been |changed.|
|00004bc0| 0a 0a 28 31 33 29 20 49 | 6e 20 74 68 65 20 73 75 |..(13) I|n the su|
|00004bd0| 62 64 69 72 65 63 74 6f | 72 79 20 61 75 78 73 63 |bdirecto|ry auxsc|
|00004be0| 72 69 70 74 73 20 79 6f | 75 20 77 69 6c 6c 20 66 |ripts yo|u will f|
|00004bf0| 69 6e 64 20 73 6f 6d 65 | 20 73 74 75 66 66 20 77 |ind some| stuff w|
|00004c00| 68 69 63 68 20 79 6f 75 | 20 6d 61 79 0a 66 69 6e |hich you| may.fin|
|00004c10| 64 20 75 73 65 66 75 6c | 20 6f 72 20 6e 6f 74 2e |d useful| or not.|
|00004c20| 20 45 2e 67 2e 2c 20 74 | 68 65 72 65 27 73 20 61 | E.g., t|here's a|
|00004c30| 20 66 69 6c 65 20 63 6f | 6e 74 72 69 62 20 77 69 | file co|ntrib wi|
|00004c40| 74 68 20 73 6f 6d 65 20 | 63 6f 6e 74 72 69 62 75 |th some |contribu|
|00004c50| 74 69 6f 6e 73 20 66 72 | 6f 6d 0a 6f 74 68 65 72 |tions fr|om.other|
|00004c60| 20 70 65 6f 70 6c 65 2e | 20 49 20 68 61 76 65 6e | people.| I haven|
|00004c70| 27 74 20 74 65 73 74 65 | 64 20 74 68 69 73 20 73 |'t teste|d this s|
|00004c80| 74 75 66 66 2e 0a 0a 28 | 31 34 29 20 52 75 6e 20 |tuff...(|14) Run |
|00004c90| 62 61 63 6b 75 70 2e 20 | 54 68 65 20 73 63 72 69 |backup. |The scri|
|00004ca0| 70 74 20 73 68 6f 77 73 | 20 69 74 73 20 6f 77 6e |pt shows| its own|
|00004cb0| 20 75 73 61 67 65 20 69 | 6e 66 6f 72 6d 61 74 69 | usage i|nformati|
|00004cc0| 6f 6e 3b 20 73 65 65 20 | 47 45 4e 45 52 41 4c 2e |on; see |GENERAL.|
|00004cd0| 44 4f 43 0a 66 6f 72 20 | 6d 6f 72 65 20 64 65 74 |DOC.for |more det|
|00004ce0| 61 69 6c 73 2e 20 46 6f | 72 20 62 61 63 6b 75 70 |ails. Fo|r backup|
|00004cf0| 73 20 74 6f 20 61 20 72 | 65 6d 6f 74 65 20 68 6f |s to a r|emote ho|
|00004d00| 73 74 2c 20 72 75 6e 20 | 6e 65 74 62 61 63 6b 75 |st, run |netbacku|
|00004d10| 70 2e 20 49 66 20 79 6f | 75 20 61 72 65 0a 70 6c |p. If yo|u are.pl|
|00004d20| 65 61 73 65 64 2c 20 73 | 65 6e 64 20 6d 65 20 61 |eased, s|end me a|
|00004d30| 20 70 6f 73 74 63 61 72 | 64 2e 20 0a 00 00 00 00 | postcar|d. .....|
|00004d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e00| 62 61 63 6b 75 70 2f 62 | 61 63 6b 75 70 73 63 72 |backup/b|ackupscr|
|00004e10| 69 70 74 73 2f 00 00 00 | 00 00 00 00 00 00 00 00 |ipts/...|........|
|00004e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e60| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 20 20 |.... 407|55 . |
|00004e70| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00004e80| 20 20 20 20 20 20 30 20 | 20 35 35 37 36 37 37 36 | 0 | 5576776|
|00004e90| 36 32 31 20 20 31 33 32 | 30 37 00 20 35 00 00 00 |621 132|07. 5...|
|00004ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f00| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00004f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005000| 62 61 63 6b 75 70 2f 62 | 61 63 6b 75 70 73 63 72 |backup/b|ackupscr|
|00005010| 69 70 74 73 2f 72 75 6e | 62 61 63 6b 75 70 00 00 |ipts/run|backup..|
|00005020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005060| 00 00 00 00 31 30 30 37 | 35 35 20 00 20 20 20 20 |....1007|55 . |
|00005070| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00005080| 20 20 20 36 33 31 34 20 | 20 35 35 33 32 37 32 37 | 6314 | 5532727|
|00005090| 32 37 33 20 20 31 35 32 | 31 37 00 20 30 00 00 00 |273 152|17. 0...|
|000050a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005100| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00005110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005120| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00005130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00005210| 2f 69 63 6d 61 6b 65 20 | 2d 71 69 0a 0a 23 64 65 |/icmake |-qi..#de|
|00005220| 66 69 6e 65 20 56 45 52 | 20 20 20 20 20 20 20 20 |fine VER| |
|00005230| 20 20 20 20 20 22 31 2e | 30 30 22 0a 0a 73 74 72 | "1.|00"..str|
|00005240| 69 6e 67 20 0a 20 20 20 | 20 68 6f 6d 65 3b 0a 0a |ing . | home;..|
|00005250| 76 6f 69 64 20 67 65 74 | 68 6f 6d 65 20 28 6c 69 |void get|home (li|
|00005260| 73 74 20 65 6e 76 70 29 | 0a 7b 0a 20 20 20 20 69 |st envp)|.{. i|
|00005270| 6e 74 0a 20 20 20 20 20 | 20 20 20 69 3b 0a 20 20 |nt. | i;. |
|00005280| 20 20 66 6f 72 20 28 69 | 20 3d 20 30 3b 20 69 20 | for (i| = 0; i |
|00005290| 3c 20 73 69 7a 65 6f 66 | 20 28 65 6e 76 70 29 3b |< sizeof| (envp);|
|000052a0| 20 69 20 2b 3d 20 32 29 | 0a 20 20 20 20 20 20 20 | i += 2)|. |
|000052b0| 20 69 66 20 28 65 6c 65 | 6d 65 6e 74 20 28 69 2c | if (ele|ment (i,|
|000052c0| 20 65 6e 76 70 29 20 3d | 3d 20 22 42 41 43 4b 55 | envp) =|= "BACKU|
|000052d0| 50 5f 48 4f 4d 45 22 29 | 0a 09 7b 0a 09 20 20 20 |P_HOME")|..{.. |
|000052e0| 20 68 6f 6d 65 20 3d 20 | 65 6c 65 6d 65 6e 74 20 | home = |element |
|000052f0| 28 69 20 2b 20 31 2c 20 | 65 6e 76 70 29 3b 0a 09 |(i + 1, |envp);..|
|00005300| 20 20 20 20 72 65 74 75 | 72 6e 3b 0a 09 7d 0a 09 | retu|rn;..}..|
|00005310| 0a 20 20 20 20 70 72 69 | 6e 74 66 20 28 22 72 75 |. pri|ntf ("ru|
|00005320| 6e 62 61 63 6b 75 70 3a | 20 45 6e 76 69 72 6f 6e |nbackup:| Environ|
|00005330| 6d 65 6e 74 20 76 61 72 | 69 61 62 6c 65 20 42 41 |ment var|iable BA|
|00005340| 43 4b 55 50 5f 48 4f 4d | 45 20 75 6e 64 65 66 69 |CKUP_HOM|E undefi|
|00005350| 6e 65 64 21 5c 6e 22 0a | 20 20 20 20 20 20 20 20 |ned!\n".| |
|00005360| 20 20 20 20 22 45 69 74 | 68 65 72 20 64 65 66 69 | "Eit|her defi|
|00005370| 6e 65 20 74 68 61 74 20 | 76 61 72 69 61 62 6c 65 |ne that |variable|
|00005380| 20 6f 72 20 75 73 65 20 | 74 68 65 20 62 61 63 6b | or use |the back|
|00005390| 75 70 20 73 63 72 69 70 | 74 2e 5c 6e 22 29 3b 0a |up scrip|t.\n");.|
|000053a0| 20 20 20 20 65 78 69 74 | 20 28 31 29 3b 09 20 20 | exit| (1);. |
|000053b0| 20 20 0a 7d 0a 0a 76 6f | 69 64 20 6d 61 69 6e 20 | .}..vo|id main |
|000053c0| 28 69 6e 74 20 61 72 67 | 63 2c 20 6c 69 73 74 20 |(int arg|c, list |
|000053d0| 61 72 67 76 2c 20 6c 69 | 73 74 20 65 6e 76 70 29 |argv, li|st envp)|
|000053e0| 0a 7b 0a 20 20 20 20 73 | 74 72 69 6e 67 0a 20 20 |.{. s|tring. |
|000053f0| 20 20 20 20 20 20 66 75 | 6c 6c 73 74 61 6d 70 66 | fu|llstampf|
|00005400| 69 6c 65 2c 0a 09 69 6e | 63 72 65 6d 65 6e 74 61 |ile,..in|crementa|
|00005410| 6c 73 74 61 6d 70 66 69 | 6c 65 2c 0a 09 76 6f 6c |lstampfi|le,..vol|
|00005420| 75 6d 65 2c 0a 09 76 6f | 6c 75 6d 65 5f 73 74 61 |ume,..vo|lume_sta|
|00005430| 72 74 64 69 72 2c 0a 09 | 76 6f 6c 75 6d 65 5f 65 |rtdir,..|volume_e|
|00005440| 78 63 6c 75 64 65 2c 0a | 09 6f 75 74 70 75 74 2c |xclude,.|.output,|
|00005450| 0a 09 66 75 6c 6c 6c 69 | 73 74 66 69 6c 65 2c 0a |..fullli|stfile,.|
|00005460| 09 69 6e 63 6c 69 73 74 | 66 69 6c 65 3b 0a 20 20 |.inclist|file;. |
|00005470| 20 20 69 6e 74 0a 20 20 | 20 20 20 20 20 20 69 6e | int. | in|
|00005480| 63 72 65 6d 65 6e 74 61 | 6c 3b 0a 09 0a 20 20 20 |crementa|l;... |
|00005490| 20 65 63 68 6f 20 28 30 | 29 3b 0a 09 0a 20 20 20 | echo (0|);... |
|000054a0| 20 69 66 20 28 61 72 67 | 63 20 3c 20 33 20 7c 7c | if (arg|c < 3 |||
|000054b0| 20 61 72 67 63 20 3e 20 | 34 29 0a 20 20 20 20 7b | argc > |4). {|
|000054c0| 0a 20 20 20 20 20 20 20 | 20 70 72 69 6e 74 66 20 |. | printf |
|000054d0| 28 22 5c 6e 22 0a 09 20 | 20 20 20 20 20 20 20 22 |("\n".. | "|
|000054e0| 49 43 43 45 20 42 61 63 | 6b 75 70 20 4d 61 6b 65 |ICCE Bac|kup Make|
|000054f0| 72 20 20 56 22 20 56 45 | 52 20 22 5c 6e 22 0a 09 |r V" VE|R "\n"..|
|00005500| 20 20 20 20 20 20 20 20 | 22 43 6f 70 79 72 69 67 | |"Copyrig|
|00005510| 68 74 20 28 63 29 20 49 | 43 43 45 20 31 39 39 34 |ht (c) I|CCE 1994|
|00005520| 2e 20 41 6c 6c 20 72 69 | 67 68 74 73 20 72 65 73 |. All ri|ghts res|
|00005530| 65 72 76 65 64 2e 5c 6e | 22 0a 09 09 22 5c 6e 22 |erved.\n|"..."\n"|
|00005540| 0a 09 09 22 72 75 6e 62 | 61 63 6b 75 70 20 62 79 |..."runb|ackup by|
|00005550| 20 4b 61 72 65 6c 20 4b | 75 62 61 74 2e 5c 6e 22 | Karel K|ubat.\n"|
|00005560| 0a 09 09 22 5c 6e 22 0a | 09 09 22 55 73 61 67 65 |..."\n".|.."Usage|
|00005570| 3a 20 72 75 6e 62 61 63 | 6b 75 70 20 5b 2d 69 6e |: runbac|kup [-in|
|00005580| 63 72 65 6d 65 6e 74 61 | 6c 5d 20 76 6f 6c 75 6d |crementa|l] volum|
|00005590| 65 20 6f 75 74 70 75 74 | 66 69 6c 65 5c 6e 22 0a |e output|file\n".|
|000055a0| 09 09 22 77 68 65 72 65 | 3a 5c 6e 22 0a 20 20 20 |.."where|:\n". |
|000055b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 20 20 | | " |
|000055c0| 20 20 20 20 20 2d 69 6e | 63 72 65 6d 65 6e 74 61 | -in|crementa|
|000055d0| 6c 20 3a 20 6f 70 74 69 | 6f 6e 61 6c 20 66 6c 61 |l : opti|onal fla|
|000055e0| 67 2c 20 61 6e 20 69 6e | 63 72 65 6d 65 6e 74 61 |g, an in|crementa|
|000055f0| 6c 20 22 0a 09 09 20 20 | 20 20 20 20 20 20 20 20 |l "... | |
|00005600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 62 | | "b|
|00005620| 61 63 6b 75 70 20 69 73 | 20 6d 61 64 65 5c 6e 22 |ackup is| made\n"|
|00005630| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005640| 20 22 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | " | |
|00005650| 20 20 20 20 20 20 20 20 | 28 64 65 66 61 75 6c 74 | |(default|
|00005660| 3a 20 66 75 6c 6c 20 62 | 61 63 6b 75 70 29 5c 6e |: full b|ackup)\n|
|00005670| 22 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |". | |
|00005680| 20 20 22 20 20 20 20 20 | 20 20 76 6f 6c 75 6d 65 | " | volume|
|00005690| 20 20 20 20 20 20 20 3a | 20 76 6f 6c 75 6d 65 20 | :| volume |
|000056a0| 74 6f 20 62 61 63 6b 75 | 70 2c 20 6d 75 73 74 20 |to backu|p, must |
|000056b0| 6d 61 74 63 68 20 6f 6e | 65 20 6f 66 20 22 0a 09 |match on|e of "..|
|000056c0| 09 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000056d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000056e0| 20 20 20 20 20 20 20 20 | 20 22 74 68 65 20 64 65 | | "the de|
|000056f0| 66 69 6e 69 74 69 6f 6e | 73 5c 6e 22 0a 20 20 20 |finition|s\n". |
|00005700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 20 20 | | " |
|00005710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005720| 20 20 20 20 69 6e 20 76 | 6f 6c 75 6d 65 73 2f 5c | in v|olumes/\|
|00005730| 6e 22 0a 09 09 22 20 20 | 20 20 20 20 20 6f 75 74 |n"..." | out|
|00005740| 70 75 74 66 69 6c 65 20 | 20 20 3a 20 61 72 63 68 |putfile | : arch|
|00005750| 69 76 65 20 74 6f 20 72 | 65 63 65 69 76 65 20 62 |ive to r|eceive b|
|00005760| 61 63 6b 75 70 5c 6e 22 | 0a 20 20 20 20 20 20 20 |ackup\n"|. |
|00005770| 20 20 20 20 20 20 20 20 | 20 22 5c 6e 22 29 3b 0a | | "\n");.|
|00005780| 20 20 20 20 20 20 20 20 | 65 78 69 74 20 28 31 29 | |exit (1)|
|00005790| 3b 0a 20 20 20 20 7d 0a | 20 20 20 20 0a 20 20 20 |;. }.| . |
|000057a0| 20 67 65 74 68 6f 6d 65 | 20 28 65 6e 76 70 29 3b | gethome| (envp);|
|000057b0| 0a 20 20 20 20 0a 20 20 | 20 20 69 66 20 28 65 6c |. . | if (el|
|000057c0| 65 6d 65 6e 74 20 28 31 | 2c 20 61 72 67 76 29 20 |ement (1|, argv) |
|000057d0| 3d 3d 20 22 2d 69 6e 63 | 72 65 6d 65 6e 74 61 6c |== "-inc|remental|
|000057e0| 22 29 0a 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 |"). {|. |
|000057f0| 20 69 6e 63 72 65 6d 65 | 6e 74 61 6c 2b 2b 3b 0a | increme|ntal++;.|
|00005800| 09 61 72 67 76 20 2d 3d | 20 28 6c 69 73 74 29 20 |.argv -=| (list) |
|00005810| 65 6c 65 6d 65 6e 74 20 | 28 31 2c 20 61 72 67 76 |element |(1, argv|
|00005820| 29 3b 0a 20 20 20 20 7d | 0a 20 20 20 20 76 6f 6c |);. }|. vol|
|00005830| 75 6d 65 20 3d 20 65 6c | 65 6d 65 6e 74 20 28 31 |ume = el|ement (1|
|00005840| 2c 20 61 72 67 76 29 3b | 0a 20 20 20 20 6f 75 74 |, argv);|. out|
|00005850| 70 75 74 20 3d 20 65 6c | 65 6d 65 6e 74 20 28 32 |put = el|ement (2|
|00005860| 2c 20 61 72 67 76 29 3b | 0a 20 20 20 20 0a 20 20 |, argv);|. . |
|00005870| 20 20 76 6f 6c 75 6d 65 | 5f 73 74 61 72 74 64 69 | volume|_startdi|
|00005880| 72 20 3d 20 68 6f 6d 65 | 20 2b 20 22 2f 76 6f 6c |r = home| + "/vol|
|00005890| 75 6d 65 73 2f 22 20 2b | 20 76 6f 6c 75 6d 65 20 |umes/" +| volume |
|000058a0| 2b 20 22 2e 73 74 61 72 | 74 64 69 72 22 3b 0a 20 |+ ".star|tdir";. |
|000058b0| 20 20 20 76 6f 6c 75 6d | 65 5f 65 78 63 6c 75 64 | volum|e_exclud|
|000058c0| 65 20 20 3d 20 68 6f 6d | 65 20 2b 20 22 2f 76 6f |e = hom|e + "/vo|
|000058d0| 6c 75 6d 65 73 2f 22 20 | 2b 20 76 6f 6c 75 6d 65 |lumes/" |+ volume|
|000058e0| 20 2b 20 22 2e 65 78 63 | 6c 75 64 65 22 3b 0a 20 | + ".exc|lude";. |
|000058f0| 20 20 20 0a 20 20 20 20 | 69 66 20 28 21 20 65 78 | . |if (! ex|
|00005900| 69 73 74 73 20 28 76 6f | 6c 75 6d 65 5f 73 74 61 |ists (vo|lume_sta|
|00005910| 72 74 64 69 72 29 20 7c | 7c 20 21 20 65 78 69 73 |rtdir) ||| ! exis|
|00005920| 74 73 20 28 76 6f 6c 75 | 6d 65 5f 65 78 63 6c 75 |ts (volu|me_exclu|
|00005930| 64 65 29 29 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |de)). | {. |
|00005940| 20 20 20 70 72 69 6e 74 | 66 20 28 22 72 75 6e 62 | print|f ("runb|
|00005950| 61 63 6b 75 70 3a 20 63 | 61 6e 27 74 20 66 69 6e |ackup: c|an't fin|
|00005960| 64 20 76 6f 6c 75 6d 65 | 20 64 65 66 69 6e 69 74 |d volume| definit|
|00005970| 69 6f 6e 20 66 69 6c 65 | 28 73 29 5c 6e 22 0a 09 |ion file|(s)\n"..|
|00005980| 20 20 20 20 20 20 20 20 | 22 28 22 2c 20 76 6f 6c | |"(", vol|
|00005990| 75 6d 65 5f 73 74 61 72 | 74 64 69 72 2c 20 22 20 |ume_star|tdir, " |
|000059a0| 6f 72 20 22 2c 20 76 6f | 6c 75 6d 65 5f 65 78 63 |or ", vo|lume_exc|
|000059b0| 6c 75 64 65 2c 20 22 29 | 5c 6e 22 29 3b 0a 09 65 |lude, ")|\n");..e|
|000059c0| 78 69 74 20 28 31 29 3b | 0a 20 20 20 20 7d 0a 20 |xit (1);|. }. |
|000059d0| 20 20 20 0a 20 20 20 20 | 66 75 6c 6c 73 74 61 6d | . |fullstam|
|000059e0| 70 66 69 6c 65 20 20 20 | 20 20 20 20 20 3d 20 68 |pfile | = h|
|000059f0| 6f 6d 65 20 2b 20 22 2f | 73 74 61 6d 70 73 2f 22 |ome + "/|stamps/"|
|00005a00| 20 2b 20 76 6f 6c 75 6d | 65 20 2b 20 22 2e 66 75 | + volum|e + ".fu|
|00005a10| 6c 6c 22 3b 0a 20 20 20 | 20 69 6e 63 72 65 6d 65 |ll";. | increme|
|00005a20| 6e 74 61 6c 73 74 61 6d | 70 66 69 6c 65 20 3d 20 |ntalstam|pfile = |
|00005a30| 63 68 61 6e 67 65 5f 65 | 78 74 20 28 66 75 6c 6c |change_e|xt (full|
|00005a40| 73 74 61 6d 70 66 69 6c | 65 2c 20 22 2e 69 6e 63 |stampfil|e, ".inc|
|00005a50| 72 65 6d 65 6e 74 61 6c | 22 29 3b 0a 20 20 20 20 |remental|");. |
|00005a60| 0a 20 20 20 20 69 66 20 | 28 69 6e 63 72 65 6d 65 |. if |(increme|
|00005a70| 6e 74 61 6c 29 0a 20 20 | 20 20 7b 0a 09 69 66 20 |ntal). | {..if |
|00005a80| 28 21 20 65 78 69 73 74 | 73 20 28 66 75 6c 6c 73 |(! exist|s (fulls|
|00005a90| 74 61 6d 70 66 69 6c 65 | 29 29 0a 09 7b 0a 09 20 |tampfile|))..{.. |
|00005aa0| 20 20 20 70 72 69 6e 74 | 66 20 28 22 72 75 6e 62 | print|f ("runb|
|00005ab0| 61 63 6b 75 70 3a 20 63 | 61 6e 27 74 20 66 69 6e |ackup: c|an't fin|
|00005ac0| 64 20 73 74 61 6d 70 66 | 69 6c 65 20 66 6f 72 20 |d stampf|ile for |
|00005ad0| 69 6e 63 72 65 6d 65 6e | 74 61 6c 20 62 61 63 6b |incremen|tal back|
|00005ae0| 75 70 5c 6e 22 0a 09 20 | 20 20 20 20 20 20 20 20 |up\n".. | |
|00005af0| 20 20 20 22 28 22 2c 20 | 66 75 6c 6c 73 74 61 6d | "(", |fullstam|
|00005b00| 70 66 69 6c 65 2c 20 22 | 29 5c 6e 22 0a 09 09 20 |pfile, "|)\n"... |
|00005b10| 20 20 20 22 59 6f 75 20 | 63 61 6e 27 74 20 6d 61 | "You |can't ma|
|00005b20| 6b 65 20 61 6e 20 69 6e | 63 72 65 6d 65 6e 74 61 |ke an in|crementa|
|00005b30| 6c 20 62 61 63 6b 75 70 | 20 77 68 65 6e 20 6e 6f |l backup| when no|
|00005b40| 20 66 75 6c 6c 20 22 0a | 20 20 20 20 20 20 20 20 | full ".| |
|00005b50| 20 20 20 20 20 20 20 20 | 09 09 20 20 20 20 22 62 | |.. "b|
|00005b60| 61 63 6b 75 70 20 65 78 | 69 73 74 73 21 5c 6e 22 |ackup ex|ists!\n"|
|00005b70| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 65 |);. | e|
|00005b80| 78 69 74 20 28 31 29 3b | 0a 09 7d 0a 20 20 20 20 |xit (1);|..}. |
|00005b90| 7d 0a 20 20 20 20 0a 20 | 20 20 20 69 6e 63 6c 69 |}. . | incli|
|00005ba0| 73 74 66 69 6c 65 20 20 | 3d 20 68 6f 6d 65 20 2b |stfile |= home +|
|00005bb0| 20 22 2f 6c 69 73 74 73 | 2f 22 20 2b 20 76 6f 6c | "/lists|/" + vol|
|00005bc0| 75 6d 65 20 2b 20 22 2e | 69 6e 63 72 65 6d 65 6e |ume + ".|incremen|
|00005bd0| 74 61 6c 22 3b 0a 20 20 | 20 20 66 75 6c 6c 6c 69 |tal";. | fullli|
|00005be0| 73 74 66 69 6c 65 20 3d | 20 68 6f 6d 65 20 2b 20 |stfile =| home + |
|00005bf0| 22 2f 6c 69 73 74 73 2f | 22 20 2b 20 76 6f 6c 75 |"/lists/|" + volu|
|00005c00| 6d 65 20 2b 20 22 2e 66 | 75 6c 6c 22 3b 0a 09 0a |me + ".f|ull";...|
|00005c10| 20 20 20 20 69 66 20 28 | 69 6e 63 72 65 6d 65 6e | if (|incremen|
|00005c20| 74 61 6c 29 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |tal). | {. |
|00005c30| 20 20 20 65 78 65 63 20 | 28 68 6f 6d 65 20 2b 20 | exec |(home + |
|00005c40| 22 2f 6d 69 73 63 2f 62 | 75 69 6c 64 6c 69 73 74 |"/misc/b|uildlist|
|00005c50| 22 2c 20 76 6f 6c 75 6d | 65 5f 73 74 61 72 74 64 |", volum|e_startd|
|00005c60| 69 72 2c 20 76 6f 6c 75 | 6d 65 5f 65 78 63 6c 75 |ir, volu|me_exclu|
|00005c70| 64 65 2c 20 0a 09 20 20 | 20 20 20 20 20 20 69 6e |de, .. | in|
|00005c80| 63 6c 69 73 74 66 69 6c | 65 2c 20 66 75 6c 6c 73 |clistfil|e, fulls|
|00005c90| 74 61 6d 70 66 69 6c 65 | 2c 20 66 75 6c 6c 6c 69 |tampfile|, fullli|
|00005ca0| 73 74 66 69 6c 65 29 3b | 0a 20 20 20 20 20 20 20 |stfile);|. |
|00005cb0| 20 65 78 65 63 20 28 68 | 6f 6d 65 20 2b 20 22 2f | exec (h|ome + "/|
|00005cc0| 61 66 69 6f 73 63 72 69 | 70 74 73 2f 6d 61 6b 65 |afioscri|pts/make|
|00005cd0| 62 61 63 6b 75 70 22 2c | 20 69 6e 63 6c 69 73 74 |backup",| inclist|
|00005ce0| 66 69 6c 65 2c 20 6f 75 | 74 70 75 74 29 3b 0a 20 |file, ou|tput);. |
|00005cf0| 20 20 20 20 20 20 20 69 | 66 20 28 65 78 69 73 74 | i|f (exist|
|00005d00| 73 20 28 69 6e 63 72 65 | 6d 65 6e 74 61 6c 73 74 |s (incre|mentalst|
|00005d10| 61 6d 70 66 69 6c 65 29 | 29 0a 09 20 20 20 20 65 |ampfile)|).. e|
|00005d20| 78 65 63 20 28 22 72 6d | 22 2c 20 22 2d 66 22 2c |xec ("rm|", "-f",|
|00005d30| 20 69 6e 63 72 65 6d 65 | 6e 74 61 6c 73 74 61 6d | increme|ntalstam|
|00005d40| 70 66 69 6c 65 29 3b 0a | 20 20 20 20 20 20 20 20 |pfile);.| |
|00005d50| 65 78 65 63 20 28 22 64 | 61 74 65 22 2c 20 22 3e |exec ("d|ate", ">|
|00005d60| 3e 22 2c 20 69 6e 63 72 | 65 6d 65 6e 74 61 6c 73 |>", incr|ementals|
|00005d70| 74 61 6d 70 66 69 6c 65 | 29 3b 0a 20 20 20 20 7d |tampfile|);. }|
|00005d80| 0a 20 20 20 20 65 6c 73 | 65 0a 20 20 20 20 7b 0a |. els|e. {.|
|00005d90| 20 20 20 20 20 20 20 20 | 65 78 65 63 20 28 68 6f | |exec (ho|
|00005da0| 6d 65 20 2b 20 22 2f 6d | 69 73 63 2f 62 75 69 6c |me + "/m|isc/buil|
|00005db0| 64 6c 69 73 74 22 2c 20 | 76 6f 6c 75 6d 65 5f 73 |dlist", |volume_s|
|00005dc0| 74 61 72 74 64 69 72 2c | 20 76 6f 6c 75 6d 65 5f |tartdir,| volume_|
|00005dd0| 65 78 63 6c 75 64 65 2c | 20 0a 09 20 20 20 20 20 |exclude,| .. |
|00005de0| 20 20 20 66 75 6c 6c 6c | 69 73 74 66 69 6c 65 29 | fulll|istfile)|
|00005df0| 3b 0a 20 20 20 20 20 20 | 20 20 65 78 65 63 20 28 |;. | exec (|
|00005e00| 68 6f 6d 65 20 2b 20 22 | 2f 61 66 69 6f 73 63 72 |home + "|/afioscr|
|00005e10| 69 70 74 73 2f 6d 61 6b | 65 62 61 63 6b 75 70 22 |ipts/mak|ebackup"|
|00005e20| 2c 20 66 75 6c 6c 6c 69 | 73 74 66 69 6c 65 2c 20 |, fullli|stfile, |
|00005e30| 6f 75 74 70 75 74 29 3b | 0a 20 20 20 20 20 20 20 |output);|. |
|00005e40| 20 69 66 20 28 65 78 69 | 73 74 73 20 28 66 75 6c | if (exi|sts (ful|
|00005e50| 6c 73 74 61 6d 70 66 69 | 6c 65 29 29 0a 09 20 20 |lstampfi|le)).. |
|00005e60| 20 20 65 78 65 63 20 28 | 22 72 6d 22 2c 20 22 2d | exec (|"rm", "-|
|00005e70| 66 22 2c 20 66 75 6c 6c | 73 74 61 6d 70 66 69 6c |f", full|stampfil|
|00005e80| 65 29 3b 0a 20 20 20 20 | 20 20 20 20 65 78 65 63 |e);. | exec|
|00005e90| 20 28 22 64 61 74 65 22 | 2c 20 22 3e 3e 22 2c 20 | ("date"|, ">>", |
|00005ea0| 66 75 6c 6c 73 74 61 6d | 70 66 69 6c 65 29 3b 0a |fullstam|pfile);.|
|00005eb0| 20 20 20 20 7d 0a 20 20 | 20 20 0a 20 20 20 20 65 | }. | . e|
|00005ec0| 78 69 74 20 28 30 29 3b | 09 0a 7d 0a 00 00 00 00 |xit (0);|..}.....|
|00005ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006000| 62 61 63 6b 75 70 2f 62 | 61 63 6b 75 70 73 63 72 |backup/b|ackupscr|
|00006010| 69 70 74 73 2f 6c 69 73 | 74 00 00 00 00 00 00 00 |ipts/lis|t.......|
|00006020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006060| 00 00 00 00 31 30 30 37 | 35 35 20 00 20 20 20 20 |....1007|55 . |
|00006070| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00006080| 20 20 20 34 36 36 34 20 | 20 35 35 33 31 31 34 33 | 4664 | 5531143|
|00006090| 31 32 33 20 20 31 34 31 | 36 37 00 20 30 00 00 00 |123 141|67. 0...|
|000060a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006100| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00006110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006120| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00006130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006200| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00006210| 2f 69 63 6d 61 6b 65 20 | 2d 71 69 0a 0a 23 64 65 |/icmake |-qi..#de|
|00006220| 66 69 6e 65 20 56 45 52 | 20 20 20 20 20 20 20 20 |fine VER| |
|00006230| 20 20 20 20 20 22 31 2e | 30 30 22 0a 0a 73 74 72 | "1.|00"..str|
|00006240| 69 6e 67 20 0a 20 20 20 | 20 68 6f 6d 65 3b 0a 0a |ing . | home;..|
|00006250| 76 6f 69 64 20 67 65 74 | 68 6f 6d 65 20 28 6c 69 |void get|home (li|
|00006260| 73 74 20 65 6e 76 70 29 | 0a 7b 0a 20 20 20 20 69 |st envp)|.{. i|
|00006270| 6e 74 0a 20 20 20 20 20 | 20 20 20 69 3b 0a 20 20 |nt. | i;. |
|00006280| 20 20 66 6f 72 20 28 69 | 20 3d 20 30 3b 20 69 20 | for (i| = 0; i |
|00006290| 3c 20 73 69 7a 65 6f 66 | 20 28 65 6e 76 70 29 3b |< sizeof| (envp);|
|000062a0| 20 69 20 2b 3d 20 32 29 | 0a 20 20 20 20 20 20 20 | i += 2)|. |
|000062b0| 20 69 66 20 28 65 6c 65 | 6d 65 6e 74 20 28 69 2c | if (ele|ment (i,|
|000062c0| 20 65 6e 76 70 29 20 3d | 3d 20 22 42 41 43 4b 55 | envp) =|= "BACKU|
|000062d0| 50 5f 48 4f 4d 45 22 29 | 0a 09 7b 0a 09 20 20 20 |P_HOME")|..{.. |
|000062e0| 20 68 6f 6d 65 20 3d 20 | 65 6c 65 6d 65 6e 74 20 | home = |element |
|000062f0| 28 69 20 2b 20 31 2c 20 | 65 6e 76 70 29 3b 0a 09 |(i + 1, |envp);..|
|00006300| 20 20 20 20 72 65 74 75 | 72 6e 3b 0a 09 7d 0a 09 | retu|rn;..}..|
|00006310| 0a 20 20 20 20 70 72 69 | 6e 74 66 20 28 22 6c 69 |. pri|ntf ("li|
|00006320| 73 74 3a 20 45 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |st: Envi|ronment |
|00006330| 76 61 72 69 61 62 6c 65 | 20 42 41 43 4b 55 50 5f |variable| BACKUP_|
|00006340| 48 4f 4d 45 20 75 6e 64 | 65 66 69 6e 65 64 21 5c |HOME und|efined!\|
|00006350| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 22 |n". | "|
|00006360| 45 69 74 68 65 72 20 64 | 65 66 69 6e 65 20 74 68 |Either d|efine th|
|00006370| 61 74 20 76 61 72 69 61 | 62 6c 65 20 6f 72 20 75 |at varia|ble or u|
|00006380| 73 65 20 74 68 65 20 62 | 61 63 6b 75 70 20 73 63 |se the b|ackup sc|
|00006390| 72 69 70 74 2e 5c 6e 22 | 29 3b 0a 20 20 20 20 65 |ript.\n"|);. e|
|000063a0| 78 69 74 20 28 31 29 3b | 09 20 20 20 20 0a 7d 0a |xit (1);|. .}.|
|000063b0| 0a 73 74 72 69 6e 67 20 | 6d 61 6b 65 74 65 6d 70 |.string |maketemp|
|000063c0| 20 28 29 0a 7b 0a 20 20 | 20 20 72 65 74 75 72 6e | ().{. | return|
|000063d0| 20 28 22 2f 74 6d 70 2f | 22 20 2b 20 22 6c 69 73 | ("/tmp/|" + "lis|
|000063e0| 74 2e 22 20 2b 20 28 73 | 74 72 69 6e 67 29 20 67 |t." + (s|tring) g|
|000063f0| 65 74 70 69 64 20 28 29 | 29 3b 0a 7d 0a 0a 76 6f |etpid ()|);.}..vo|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.